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 package edu.samplu.travel.test;
017
018 import org.junit.After;
019 import org.junit.Before;
020 import org.junit.Test;
021 import org.junit.Assert;
022
023 import com.thoughtworks.selenium.DefaultSelenium;
024 import com.thoughtworks.selenium.SeleneseTestCase;
025 /**
026 * TODO Administrator don't forget to fill this in.
027 *
028 * @author Kuali Rice Team (rice.collab@kuali.org)
029 */
030 public class FiscalOfficerInfoMaintenanceNewTest extends SeleneseTestCase{
031
032 @Before
033 public void setUp() throws Exception {
034 selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost:8080/");
035 selenium.start();
036 }
037
038 @Test
039 public void testUntitled() throws Exception {
040 selenium.open("/kr-dev/portal.do?selectedTab=main");
041 selenium.type("__login_user", "admin");
042 selenium.click("//input[@value='Login']");
043 //selenium.click("link=FiscalOfficerInfo Maintenance (New)");
044 selenium.waitForPageToLoad("50000");
045 selenium.click("//a[@title='FiscalOfficerInfo Maintenance (New)']");
046 selenium.waitForPageToLoad("50000");
047 selenium.selectFrame("iframeportlet");
048 //selenium.type("document.documentHeader.documentDescription", "New FO Doc");
049 selenium.type("//input[@name='document.documentHeader.documentDescription']", "New FO Doc");
050 //selenium.type("document.newMaintainableObject.dataObject.id", "6");
051 selenium.type("//input[@name='document.newMaintainableObject.dataObject.id']", "11");
052 //selenium.type("document.newMaintainableObject.dataObject.userName", "Chris");
053 selenium.type("//input[@name='document.newMaintainableObject.dataObject.userName']", "Fletcher");
054 // selenium.type("newCollectionLines['document.newMaintainableObject.dataObject.accounts'].number", "123123");
055 // selenium.type("xpath = //input[@name='document.newMaintainableObject.dataObject.accounts[0].number']", "123123");
056 // selenium.type("//input[contains(@name , '.number')]", "123123");
057 // selenium.type("newCollectionLines['document.newMaintainableObject.dataObject.accounts'].name", "ChrisTravelAcc");
058 // selenium.type("xpath = //input[@name='document.newMaintainableObject.dataObject.accounts[0].name']", "ChrisTravelAcc");
059 // selenium.type("//input[contains(@name , '.name')]", "JustinTravelAcc");
060 // selenium.click("add");
061 // selenium.click("//input[@value='add']");
062 // System.out.println("adding Row");
063 // selenium.wait(90000);
064 System.out.println("Waiting Test");
065 selenium.click("//input[@value='save']");
066 // selenium.click("link=FiscalOfficerInfo Maintenance (New)");
067 selenium.waitForPageToLoad("50000");
068 selenium.click("//input[@value='submit']");
069 selenium.waitForPageToLoad("50000");
070 System.out.println("Submiting Test");
071 // selenium.waitForPageToLoad("60000");
072
073 System.out.println("Test complete");
074 }
075
076
077
078 @After
079 public void tearDown() throws Exception {
080 selenium.stop();
081 }
082 }