View Javadoc

1   package edu.samplu.common;
2   
3   /**
4    * @deprecated use WebDriverITBase
5    * @author Kuali Rice Team (rice.collab@kuali.org)
6    */
7   
8   public abstract class MenuLegacyITBase extends WebDriverLegacyITBase {
9       @Override
10      public String getTestUrl() {
11          return ITUtil.PORTAL;
12      }
13  
14      /**
15       * TODO when the UpgradedSelenium tests have been converted over, rename this to getMenuLinkText
16       * Override to return menu click selector (e.g. "Main Menu")
17       * @return selenium locator to click on
18       */
19      protected abstract String getMenuLinkLocator();
20  
21      /**
22       * TODO when the UpgradedSelenium tests have been converted over, rename this to getLinkText
23       * Override to return main menu click selector (e.g. "Agenda lookup")
24       * @return selenium locator to click on
25       */
26      protected abstract String getLinkLocator();
27  
28  
29      /**
30       * Override to return main menu click selector (e.g. "//img[@alt='create new']")
31       * @return selenium locator to click on
32       */
33      protected abstract String getCreateNewLinkLocator();
34  
35      /**
36       * go to the getMenuLinkLocator() Menu and click the getLinkLocator()
37       */
38      protected void gotoMenuLinkLocator(String message) throws Exception {
39          waitForTitleToEqualKualiPortalIndex();
40          waitAndClickByLinkText(getMenuLinkLocator(), message);
41          waitForTitleToEqualKualiPortalIndex();
42          waitAndClickByLinkText(getLinkLocator(), message);
43          waitForTitleToEqualKualiPortalIndex(message);
44          selectFrame("iframeportlet");
45          checkForIncidentReport(getLinkLocator(), message);
46      }
47  
48      protected void gotoMenuLinkLocator() throws Exception {
49          gotoMenuLinkLocator("");
50      }
51      /**
52       * go to having clicked create new of the getLinkLocator()
53       */
54      protected void gotoCreateNew() throws Exception {
55          gotoMenuLinkLocator();
56          waitAndClick(getCreateNewLinkLocator(), "");
57          //        selectFrame("relative=up");
58          checkForIncidentReport(getCreateNewLinkLocator());
59      }
60  }