1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.samplu.krad.compview;
18
19 import edu.samplu.common.ITUtil;
20 import edu.samplu.common.WebDriverLegacyITBase;
21
22 import org.junit.Test;
23 import org.openqa.selenium.internal.seleniumemulation.GetValue;
24
25 import static org.junit.Assert.assertNotSame;
26 import static org.junit.Assert.fail;
27
28
29
30
31
32
33 public class DeleteSubCollectionLineLegacyIT extends WebDriverLegacyITBase{
34 @Override
35 public String getTestUrl() {
36 return "/kr-krad/uicomponents?viewId=UifCompView_KNS&methodToCall=start&readOnlyFields=field91";
37 }
38
39 @Test
40
41
42
43 public void deleteSubCollectionLine() throws Exception {
44
45 waitAndClickByLinkText("Collections");
46 Thread.sleep(5000);
47
48
49 waitForElementPresentByName("list4[0].subList[0].field1");
50
51 waitAndTypeByName("list4[0].subList[0].field1", "selenium");
52
53 waitAndClick("div[title='Line Summary \\'A\\' With Expression'].uif-group.uif-gridGroup.uif-collectionItem.uif-gridCollectionItem div.uif-group.uif-collectionGroup.uif-tableCollectionGroup.uif-tableSubCollection.uif-disclosure tr.odd button[data-loadingmessage='Deleting Line...'].uif-action.uif-secondaryActionButton.uif-smallActionButton");
54
55 Thread.sleep(2000);
56
57
58 for (int second = 0;; second++) {
59 if (second >= 60) fail("timeout");
60 try {
61 System.out.println("Loop ----- "+second);
62 if (!"selenium".equals(getAttributeByName("list4[0].subList[0].field1","value")))
63 break;
64 } catch (Exception e) {}
65 Thread.sleep(1000);
66 }
67
68 assertNotSame("selenium", getAttributeByName("list4[0].subList[0].field1","value"));
69 passed();
70 }
71 }