1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.krad.travelview;
17
18 import com.thoughtworks.selenium.DefaultSelenium;
19 import org.junit.After;
20 import org.junit.Before;
21 import org.junit.Test;
22
23 import static org.junit.Assert.assertTrue;
24
25 public class MaintenanceHeaderIT {
26 private DefaultSelenium selenium;
27
28 @Before
29 public void setUp() throws Exception {
30 selenium = new DefaultSelenium("localhost", 4444, "*chrome", System.getProperty("remote.public.url"));
31 selenium.start();
32 }
33
34 @Test
35
36
37
38 public void testVerifyHeaderFields() throws Exception {
39 selenium.open("/kr-dev/portal.do");
40 selenium.type("name=__login_user", "admin");
41 selenium.click("css=input[type=\"submit\"]");
42 selenium.waitForPageToLoad("30000");
43 selenium.click("link=KRAD");
44 selenium.waitForPageToLoad("50000");
45 selenium.click("link=Travel Account Maintenance (New)");
46 selenium.waitForPageToLoad("100000");
47 selenium.selectFrame("iframeportlet");
48 assertTrue(selenium.isElementPresent("//div[contains(@class, 'uif-documentNumber')]"));
49 assertTrue(selenium.isElementPresent("//div[contains(@class, 'uif-documentInitiatorNetworkId')]"));
50 assertTrue(selenium.isElementPresent("//div[contains(@class, 'uif-documentStatus')]"));
51 assertTrue(selenium.isElementPresent("//div[contains(@class, 'uif-documentCreateDate')]"));
52 }
53
54 @After
55 public void tearDown() throws Exception {
56 selenium.stop();
57 }
58 }