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