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
22 import com.thoughtworks.selenium.DefaultSelenium;
23 import com.thoughtworks.selenium.SeleneseTestCase;
24
25 @Ignore
26 public class ClockSeleniumTest extends SeleneseTestCase {
27 @Before
28 public void setUp() throws Exception {
29 selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost:8090/");
30 try {
31 selenium.start();
32 } catch (Exception e) {
33 }
34 }
35
36 @Ignore
37 public void testClockSelenium() throws Exception {
38 selenium.open("/tk-dev/Clock.do");
39 selenium.type("__login_user", "admin");
40 selenium.click("//input[@name='login']");
41 selenium.waitForPageToLoad("30000");
42
43
44 selenium.click("//input[@name='distributeTime']");
45 selenium.waitForPopUp("distributePopup", "30000");
46 selenium.selectWindow("distributePopup");
47 selenium.getBodyText();
48 selenium.click("//input[@name='editTimeBlock']");
49 selenium.waitForPageToLoad("30000");
50 selenium.click("//input[@name='addTimeBlock']"); // add two time blocks
51 selenium.click("//input[@name='addTimeBlock']");
52 selenium.click("//input[@name='saveTimeBlock']");
53 assertTrue(selenium.isTextPresent("Total Hours entered not equel to the hours of the original time block"));
54
55
56 selenium.type("beginTimeField", "08:15 AM");
57 selenium.close();
58 selenium.selectWindow(null);
59 }
60
61 @After
62 public void tearDown() throws Exception {
63 selenium.stop();
64 }
65 }