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 package edu.samplu.travel.test; 17 18 import org.junit.After; 19 import org.junit.Before; 20 import org.junit.Test; 21 import org.junit.Assert; 22 23 import com.thoughtworks.selenium.DefaultSelenium; 24 import com.thoughtworks.selenium.SeleneseTestCase; 25 /** 26 * TODO Administrator don't forget to fill this in. 27 * 28 * @author Kuali Rice Team (rice.collab@kuali.org) 29 */ 30 public class FiscalOfficerInfoMaintenanceNewTest extends SeleneseTestCase{ 31 32 @Before 33 public void setUp() throws Exception { 34 selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost:8080/"); 35 selenium.start(); 36 } 37 38 @Test 39 public void testUntitled() throws Exception { 40 selenium.open("/kr-dev/portal.do?selectedTab=main"); 41 selenium.type("__login_user", "admin"); 42 selenium.click("//input[@value='Login']"); 43 //selenium.click("link=FiscalOfficerInfo Maintenance (New)"); 44 selenium.waitForPageToLoad("50000"); 45 selenium.click("//a[@title='FiscalOfficerInfo Maintenance (New)']"); 46 selenium.waitForPageToLoad("50000"); 47 selenium.selectFrame("iframeportlet"); 48 //selenium.type("document.documentHeader.documentDescription", "New FO Doc"); 49 selenium.type("//input[@name='document.documentHeader.documentDescription']", "New FO Doc"); 50 //selenium.type("document.newMaintainableObject.dataObject.id", "6"); 51 selenium.type("//input[@name='document.newMaintainableObject.dataObject.id']", "11"); 52 //selenium.type("document.newMaintainableObject.dataObject.userName", "Chris"); 53 selenium.type("//input[@name='document.newMaintainableObject.dataObject.userName']", "Fletcher"); 54 // selenium.type("newCollectionLines['document.newMaintainableObject.dataObject.accounts'].number", "123123"); 55 // selenium.type("xpath = //input[@name='document.newMaintainableObject.dataObject.accounts[0].number']", "123123"); 56 // selenium.type("//input[contains(@name , '.number')]", "123123"); 57 // selenium.type("newCollectionLines['document.newMaintainableObject.dataObject.accounts'].name", "ChrisTravelAcc"); 58 // selenium.type("xpath = //input[@name='document.newMaintainableObject.dataObject.accounts[0].name']", "ChrisTravelAcc"); 59 // selenium.type("//input[contains(@name , '.name')]", "JustinTravelAcc"); 60 // selenium.click("add"); 61 // selenium.click("//input[@value='add']"); 62 // System.out.println("adding Row"); 63 // selenium.wait(90000); 64 System.out.println("Waiting Test"); 65 selenium.click("//input[@value='save']"); 66 // selenium.click("link=FiscalOfficerInfo Maintenance (New)"); 67 selenium.waitForPageToLoad("50000"); 68 selenium.click("//input[@value='submit']"); 69 selenium.waitForPageToLoad("50000"); 70 System.out.println("Submiting Test"); 71 // selenium.waitForPageToLoad("60000"); 72 73 System.out.println("Test complete"); 74 } 75 76 77 78 @After 79 public void tearDown() throws Exception { 80 selenium.stop(); 81 } 82 }