1 19 20 package org.apache.geronimo.testsuite.console; 21 22 import org.apache.geronimo.testsupport.SeleniumTestSupport; 23 24 29 public abstract class ConsoleTestSupport 30 extends SeleniumTestSupport 31 { 32 protected void login() throws Exception { 33 selenium.open("/"); 34 selenium.waitForPageToLoad("30000"); 35 assertEquals("Apache Geronimo", selenium.getTitle()); 36 37 selenium.click("link=Console"); 38 selenium.waitForPageToLoad("30000"); 39 assertEquals("Geronimo Console Login", selenium.getTitle()); 40 41 selenium.type("j_username", "system"); 42 selenium.type("j_password", "manager"); 43 selenium.click("submit"); 44 selenium.waitForPageToLoad("30000"); 45 assertEquals("Geronimo Console", selenium.getTitle()); 46 } 47 48 protected void logout() throws Exception { 49 selenium.click("//a[contains(@href, '/console/logout.jsp')]"); 50 selenium.waitForPageToLoad("30000"); 51 assertEquals("Geronimo Console Login", selenium.getTitle()); 52 53 selenium.removeCookie("JSESSIONID", "/"); 54 } 55 } 56 57 | Popular Tags |