public class TestWb extends SeleneseTestCase { @Before public void setUp() throws Exception { WebDriver driver = new FirefoxDriver(); String baseUrl = "http://www.baidu.com/"; selenium = new WebDriverBackedSelenium(driver, baseUrl); } @Test public void testWb() throws Exception { selenium.open(baseUrl); selenium.type("id=kw", "hello"); selenium.click("id=su"); selenium.waitForPageToLoad("30000"); } @After public void tearDown() throws Exception { selenium.stop(); }
更多资料关注:www.kootest.com ;技术交流群:182526995