1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.clock.web;
17
18 import org.junit.After;
19 import org.junit.Before;
20 import org.junit.Ignore;
21 import org.kuali.kpme.core.FunctionalTest;
22
23 import com.thoughtworks.selenium.DefaultSelenium;
24 import com.thoughtworks.selenium.SeleneseTestCase;
25
26 @Ignore
27 @FunctionalTest
28 public class ClockSeleniumTest extends SeleneseTestCase {
29 @Before
30 public void setUp() throws Exception {
31 selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost:8090/");
32 try {
33 selenium.start();
34 } catch (Exception e) {
35 }
36 }
37
38 @Ignore
39 public void testClockSelenium() throws Exception {
40 selenium.open("/tk-dev/Clock.do");
41 selenium.type("__login_user", "admin");
42 selenium.click("//input[@name='login']");
43 selenium.waitForPageToLoad("30000");
44
45
46 selenium.click("//input[@name='distributeTime']");
47 selenium.waitForPopUp("distributePopup", "30000");
48 selenium.selectWindow("distributePopup");
49 selenium.getBodyText();
50 selenium.click("//input[@name='editTimeBlock']");
51 selenium.waitForPageToLoad("30000");
52 selenium.click("//input[@name='addTimeBlock']"); // add two time blocks
53 selenium.click("//input[@name='addTimeBlock']");
54 selenium.click("//input[@name='saveTimeBlock']");
55 assertTrue(selenium.isTextPresent("Total Hours entered not equel to the hours of the original time block"));
56
57
58 selenium.type("beginTimeField", "08:15 AM");
59 selenium.close();
60 selenium.selectWindow(null);
61 }
62
63 @After
64 public void tearDown() throws Exception {
65 selenium.stop();
66 }
67 }