1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import com.thoughtworks.selenium.*; import org.junit.After; import org.junit.Before; import org.junit.Test; public class VerifyLogin extends SeleneseTestCase { @Before public void setUp() throws Exception { selenium = new DefaultSelenium("localhost", 4444, "*chrome", "localhost:8422/"); selenium.start(); } @Test public void testVerifyDirectorLogin() throws Exception { selenium.setTimeout("300000"); selenium.open("/ibm/console/logon.jsp"); selenium.type("id=j_username", "test"); selenium.type("id=j_password", "test"); selenium.click("id=other"); selenium.waitForPageToLoad("300000"); verifyTrue(selenium.isTextPresent("IBM Systems Director")); } @After public void tearDown() throws Exception { selenium.stop(); } } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |