1   package edu.samplu.common;
2   
3   
4   
5   
6   
7   public abstract class MenuITBase extends UpgradedSeleniumITBase {
8       @Override
9       public String getTestUrl() {
10          return ITUtil.PORTAL;
11      }
12  
13      
14  
15  
16  
17      protected abstract String getMenuLinkLocator();
18  
19      
20  
21  
22  
23      protected abstract String getLinkLocator();
24  
25  
26      
27  
28  
29  
30      protected abstract String getCreateNewLinkLocator();
31  
32      
33  
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  
51  
52      protected void gotoCreateNew() throws Exception {
53          gotoMenuLinkLocator();
54          waitAndClick(getCreateNewLinkLocator(), "");
55          
56          checkForIncidentReport(getCreateNewLinkLocator());
57      }
58  }