001 package edu.samplu.common;
002
003 /**
004 * @deprecated use WebDriverITBase
005 * @author Kuali Rice Team (rice.collab@kuali.org)
006 */
007
008 public abstract class MenuLegacyITBase extends WebDriverLegacyITBase {
009 @Override
010 public String getTestUrl() {
011 return ITUtil.PORTAL;
012 }
013
014 /**
015 * TODO when the UpgradedSelenium tests have been converted over, rename this to getMenuLinkText
016 * Override to return menu click selector (e.g. "Main Menu")
017 * @return selenium locator to click on
018 */
019 protected abstract String getMenuLinkLocator();
020
021 /**
022 * TODO when the UpgradedSelenium tests have been converted over, rename this to getLinkText
023 * Override to return main menu click selector (e.g. "Agenda lookup")
024 * @return selenium locator to click on
025 */
026 protected abstract String getLinkLocator();
027
028
029 /**
030 * Override to return main menu click selector (e.g. "//img[@alt='create new']")
031 * @return selenium locator to click on
032 */
033 protected abstract String getCreateNewLinkLocator();
034
035 /**
036 * go to the getMenuLinkLocator() Menu and click the getLinkLocator()
037 */
038 protected void gotoMenuLinkLocator(String message) throws Exception {
039 waitForTitleToEqualKualiPortalIndex();
040 waitAndClickByLinkText(getMenuLinkLocator(), message);
041 waitForTitleToEqualKualiPortalIndex();
042 waitAndClickByLinkText(getLinkLocator(), message);
043 waitForTitleToEqualKualiPortalIndex(message);
044 selectFrame("iframeportlet");
045 checkForIncidentReport(getLinkLocator(), message);
046 }
047
048 protected void gotoMenuLinkLocator() throws Exception {
049 gotoMenuLinkLocator("");
050 }
051 /**
052 * go to having clicked create new of the getLinkLocator()
053 */
054 protected void gotoCreateNew() throws Exception {
055 gotoMenuLinkLocator();
056 waitAndClick(getCreateNewLinkLocator(), "");
057 // selectFrame("relative=up");
058 checkForIncidentReport(getCreateNewLinkLocator());
059 }
060 }