• WebDriver 运行模式下使用rc 代码


    selenium2 对之前的rc 代码提供了兼容性接口,如果你之前的code 都是用rc 写,而现在又想摆脱要每次启动server,你只需要 略做修改即可。代码如下: 

    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

  • 相关阅读:
    每日日报63
    每日日报62
    每日日报61
    每日日报60
    每日日报59
    每日日报58
    el-table表格拖动排序
    vue/eslint
    $attrs $listeners
    table封装成全局组件
  • 原文地址:https://www.cnblogs.com/kootest/p/4088105.html
Copyright © 2020-2023  润新知