1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package edu.sampleu.admin;
17  
18  import org.apache.commons.lang.RandomStringUtils;
19  
20  
21  
22  
23  public abstract class GroupAftBase extends AdminTmplMthdAftNavCreateNewBase {
24  
25      protected void createNewEnterDetails() throws InterruptedException {
26          waitAndTypeByName("document.documentHeader.documentDescription", RandomStringUtils.randomAlphanumeric(9));
27          selectByName("document.groupNamespace","KR-BUS - Service Bus");
28          waitAndTypeByName("document.groupName",RandomStringUtils.randomAlphanumeric(9));
29      }
30  
31      
32  
33  
34  
35  
36      @Override
37      protected String getLinkLocator() {
38          return "Group";
39      }
40  
41      protected void saveAndClose() throws InterruptedException {
42          checkForDocError();
43          waitAndClickByXpath(SAVE_XPATH);
44          waitForTextPresent("Document was successfully saved");
45          waitAndClickByName("methodToCall.close");
46  
47      }
48  
49      protected void saveAndReload() throws InterruptedException {
50          checkForDocError();
51          waitAndClickByXpath(SAVE_XPATH);
52          waitForTextPresent("Document was successfully saved");
53          waitAndClickByName("methodToCall.reload");
54  
55      }
56  
57      protected void submitAndClose() throws InterruptedException {
58          checkForDocError();
59          waitAndClickByName("methodToCall.route");
60          waitForTextPresent("Document was successfully submitted");
61          waitAndClickByName("methodToCall.close");
62  
63      }
64  
65      
66  
67  
68  
69  
70  
71      protected void submit() throws InterruptedException {
72          checkForDocError();
73          waitAndClickByName("methodToCall.route");
74          waitForTextPresent("Document was successfully submitted");
75      }
76  }