1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.samplu.mainmenu.test;
18
19 import org.junit.After;
20 import org.junit.Before;
21 import org.junit.Test;
22
23 import com.thoughtworks.selenium.DefaultSelenium;
24 import com.thoughtworks.selenium.Selenium;
25
26
27
28
29
30
31
32 public class AttributeDefinitionLookUpIT {
33
34 private Selenium selenium;
35 @Before
36 public void setUp() throws Exception {
37 selenium = new DefaultSelenium("localhost", 4444, "*firefox", System.getProperty("remote.public.url"));
38 selenium.start();
39 }
40
41 @Test
42 public void testAttributeDefinitionLookUp() throws Exception {
43 selenium.open(System.getProperty("remote.public.url"));
44 selenium.type("name=__login_user", "admin");
45 selenium.click("css=input[type=\"submit\"]");
46 selenium.waitForPageToLoad("30000");
47 selenium.click("link=Attribute Definition Lookup");
48 selenium.waitForPageToLoad("30000");
49 selenium.selectFrame("iframeportlet");
50 selenium.click("id=u80");
51 selenium.waitForPageToLoad("30000");
52 selenium.click("id=u86");
53 selenium.waitForPageToLoad("30000");
54 selenium.selectWindow("null");
55 selenium.click("xpath=(//input[@name='imageField'])[2]");
56 selenium.waitForPageToLoad("30000");
57
58 }
59
60 @After
61 public void tearDown() throws Exception {
62 selenium.stop();
63 }
64
65 }