View Javadoc

1   /*
2    * Copyright 2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl1.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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   * tests whether the Attribute Definition Look UP is working ok 
29   * 
30   * @author Kuali Rice Team (rice.collab@kuali.org)
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  }