以下之间有什么区别:
open(url); // this is from Selenide
&
driver.navigate().to(url); //this is from selenium
&
driver.get(url); //this is from selenium
最佳答案
没有什么大的区别。 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");
...
}
关于selenium - Selenide- open() 与 navigator 和 get 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36125122/