1   package edu.samplu.common;
2   
3   import org.openqa.selenium.By;
4   
5   
6   
7   
8   
9   
10  public abstract class MenuLegacyITBase extends WebDriverLegacyITBase {
11      @Override
12      public String getTestUrl() {
13          return ITUtil.PORTAL;
14      }
15  
16      
17  
18  
19  
20  
21      protected abstract String getMenuLinkLocator();
22  
23      
24  
25  
26  
27  
28      protected abstract String getLinkLocator();
29  
30  
31      
32  
33  
34  
35      protected abstract String getCreateNewLinkLocator();
36  
37      
38  
39  
40      protected void gotoMenuLinkLocator(String message) throws Exception {
41          waitForTitleToEqualKualiPortalIndex();
42          waitAndClickByLinkText(getMenuLinkLocator(), message);
43          waitForTitleToEqualKualiPortalIndex();
44          waitAndClickByLinkText(getLinkLocator(), message);
45          waitForTitleToEqualKualiPortalIndex(message);
46          selectFrame("iframeportlet");
47          checkForIncidentReport(getLinkLocator(), message);
48      }
49  
50      protected void gotoMenuLinkLocator() throws Exception {
51          gotoMenuLinkLocator("");
52      }
53      
54  
55  
56      protected void gotoCreateNew() throws Exception {
57          gotoMenuLinkLocator();
58          waitAndClick(By.xpath(getCreateNewLinkLocator()));
59          
60          checkForIncidentReport(getCreateNewLinkLocator());
61      }
62  }