1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.krad.screenelement;
17
18 import org.junit.Test;
19 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
20 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21 import org.kuali.rice.testtools.selenium.WebDriverUtils;
22
23
24
25
26 public class ReadOnlyFieldsDemoAft extends WebDriverLegacyITBase {
27
28
29
30
31 public static final String BOOKMARK_URL ="/kr-krad/uicomponents?viewId=Demo-ReadOnlyTestView&methodToCall=start";
32
33 @Override
34 protected String getBookmarkUrl() {
35 return BOOKMARK_URL;
36 }
37
38 @Override
39 protected void navigate() throws InterruptedException {
40 waitAndClickKRAD();
41 waitAndClickByLinkText("ReadOnly fields Demo");
42 switchToWindow("Kuali :: ReadOnly Test");
43 }
44
45 private void testReadOnlyFieldsDemo() throws Exception{
46 waitAndTypeByName("field2","Hi");
47 waitAndTypeByName("field3","KualiRice!");
48 selectByName("field4","Option 1");
49 waitAndClickByName("field117","2");
50 waitAndClickByName("field115","3");
51 waitAndTypeByName("date1","02/17/2014");
52 selectByName("field116","Option 3");
53 waitAndClickButtonByText("Make ReadOnly");
54 String [] assertText = {"Hi","KualiRice!","Option 1","02/17/2014","Option 3"};
55 assertTextPresent(assertText);
56 }
57
58 @Test
59 public void testReadOnlyFieldsDemoBookmark() throws Exception {
60 testReadOnlyFieldsDemo();
61 passed();
62 }
63
64 @Test
65 public void testReadOnlyFieldsDemoNav() throws Exception {
66 testReadOnlyFieldsDemo();
67 passed();
68 }
69
70 }