View Javadoc

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