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