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 PermissionAftBase extends AdminTmplMthdAftNavCreateNewBase {
24
25 protected void createNewEnterDetails() throws InterruptedException {
26 waitAndTypeByName("document.documentHeader.documentDescription",RandomStringUtils.randomAlphabetic(30));
27 selectByName("document.newMaintainableObject.templateId","KR-IDM : Assign Role");
28 selectByName("document.newMaintainableObject.namespaceCode","KR-BUS - Service Bus");
29 waitAndTypeByName("document.newMaintainableObject.name",RandomStringUtils.randomAlphabetic(10));
30 }
31
32
33
34
35
36
37 @Override
38 protected String getLinkLocator() {
39 return "Permission";
40 }
41
42 protected void saveAndClose() throws InterruptedException {
43 checkForDocError();
44 waitAndClickByXpath(SAVE_XPATH);
45 waitForTextPresent("Document was successfully saved");
46 waitAndClickByName("methodToCall.close");
47
48 }
49
50 protected void saveAndReload() throws InterruptedException {
51 checkForDocError();
52 waitAndClickByXpath(SAVE_XPATH);
53 waitForTextPresent("Document was successfully saved");
54 waitAndClickByName("methodToCall.reload");
55
56 }
57
58 protected void submitAndClose() throws InterruptedException {
59 checkForDocError();
60 waitAndClickByName("methodToCall.route");
61 waitForTextPresent("Document was successfully submitted");
62 waitAndClickByName("methodToCall.close");
63
64 }
65
66
67
68
69
70
71
72 protected void submit() throws InterruptedException {
73 checkForDocError();
74 waitAndClickByName("methodToCall.route");
75 waitForTextPresent("Document was successfully submitted");
76 }
77 }