2

what are the differences between the following:

open(url); // this is from Selenide

&

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

&

driver.get(url); //this is from selenium
Hana90
  • 943
  • 5
  • 17
  • 37
  • I don't know about selenide. For get and navigate refer this : http://stackoverflow.com/questions/5664808/difference-between-webdriver-get-and-webdriver-navigate – Prateek Mar 21 '16 at 07:44

1 Answers1

3

There is no big difference. open(url) is a synonym for driver.navigate().to(url);

Also, method open(url) supports relative urls. So you can set base url once and use relative urls all over your tests:

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

@Test
public void test1() {
  open("/payments/index");
  ...
}
Andrei Solntsev
  • 480
  • 2
  • 8