Selenium driver.get() vs driver.navigate().to()

  • 1 Replies
  • 949 Views
Selenium driver.get() vs driver.navigate().to()
« on: March 10, 2016, 09:55:11 am »
Code
driver.navigate().to("http://www.google.com");
driver.get("http://www.google.com");

What is the difference between the two?

Re: Selenium driver.get() vs driver.navigate().to()
« Reply #1 on: March 10, 2016, 13:19:41 pm »
They are exactly the same.
driver.get is just to make it easier for us.

the driver.navigate has some additional useful methods to navigate between pages e.g.

Code
driver.navigate().back();
driver.navigate().forward();

 

Sitemap 1 2 3 4 5 6 7 8