【问题标题】:Selenide- different between open() & navigate & get硒化物- open() & 导航 & get 之间的不同
【发布时间】:2016-03-21 07:19:12
【问题描述】:

以下有什么区别:

open(url); // this is from Selenide

&

 driver.navigate().to(url); //this is from selenium

&

driver.get(url); //this is from selenium

【问题讨论】:

标签: selenium selenium-webdriver selenide


【解决方案1】:

没有太大区别。 open(url)driver.navigate().to(url); 的同义词

另外,open(url) 方法支持相对 url。因此,您可以设置一次基本 url 并在整个测试中使用相对 url:

public void setUp() {
  Configuration.baseUrl = "http://localhost:8888";
}

@Test
public void test1() {
  open("/payments/index");
  ...
}

【讨论】:

    猜你喜欢
    • 2022-12-30
    • 2016-08-06
    • 1970-01-01
    • 1970-01-01
    • 2020-03-30
    • 2021-01-06
    • 2020-11-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多