001 /** 002 * Copyright 2005-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/ecl2.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 package edu.samplu.mainmenu.test; 017 018 import static org.junit.Assert.assertTrue; 019 020 import org.junit.After; 021 import org.junit.Before; 022 import org.junit.Test; 023 024 import com.thoughtworks.selenium.DefaultSelenium; 025 import com.thoughtworks.selenium.Selenium; 026 027 028 /** 029 * tests whether the Category Look UP is working ok 030 * 031 * @author Kuali Rice Team (rice.collab@kuali.org) 032 */ 033 public class CategoryLookUpIT { 034 035 private Selenium selenium; 036 @Before 037 public void setUp() throws Exception { 038 selenium = new DefaultSelenium("localhost", 4444, "*firefox", System.getProperty("remote.public.url")); 039 selenium.start(); 040 } 041 042 @Test 043 public void testCategoryLookUp() throws Exception { 044 selenium.open(System.getProperty("remote.public.url")); 045 selenium.type("name=__login_user", "admin"); 046 selenium.click("css=input[type=\"submit\"]"); 047 selenium.waitForPageToLoad("30000"); 048 selenium.click("link=Category Lookup"); 049 selenium.waitForPageToLoad("30000"); 050 selenium.selectFrame("iframeportlet"); 051 selenium.click("id=u80"); 052 selenium.waitForPageToLoad("30000"); 053 selenium.click("id=u86"); 054 selenium.waitForPageToLoad("30000"); 055 selenium.selectWindow("null"); 056 selenium.click("xpath=(//input[@name='imageField'])[2]"); 057 selenium.waitForPageToLoad("30000"); 058 } 059 060 @After 061 public void tearDown() throws Exception { 062 selenium.stop(); 063 } 064 065 }