001    /*
002     * Copyright 2011 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl1.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    
017    package edu.samplu.mainmenu.test;
018    
019    import org.junit.After;
020    import org.junit.Before;
021    import org.junit.Test;
022    
023    import com.thoughtworks.selenium.DefaultSelenium;
024    import com.thoughtworks.selenium.Selenium;
025    
026    
027    /**
028     * tests whether the Attribute Definition Look UP is working ok 
029     * 
030     * @author Kuali Rice Team (rice.collab@kuali.org)
031     */
032    public class AttributeDefinitionLookUpIT {
033    
034        private Selenium selenium;
035        @Before
036        public void setUp() throws Exception {
037            selenium = new DefaultSelenium("localhost", 4444, "*firefox", System.getProperty("remote.public.url"));
038            selenium.start();
039        }
040        
041        @Test
042        public void testAttributeDefinitionLookUp() throws Exception {
043            selenium.open(System.getProperty("remote.public.url"));
044            selenium.type("name=__login_user", "admin");
045            selenium.click("css=input[type=\"submit\"]");
046            selenium.waitForPageToLoad("30000");
047            selenium.click("link=Attribute Definition Lookup");
048            selenium.waitForPageToLoad("30000");
049            selenium.selectFrame("iframeportlet");
050            selenium.click("id=u80");
051            selenium.waitForPageToLoad("30000");
052            selenium.click("id=u86");
053            selenium.waitForPageToLoad("30000");
054            selenium.selectWindow("null");
055            selenium.click("xpath=(//input[@name='imageField'])[2]");
056            selenium.waitForPageToLoad("30000");
057            
058        }
059        
060        @After
061        public void tearDown() throws Exception {
062            selenium.stop();
063        }
064    
065    }