Difference Between driver.get() and driver.navigate()

 

driver.get() is used to navigate particular URL(website) and wait till page load.
driver.navigate() is used to navigate to particular URL and does not wait to page load. It maintains browser history or cookies to navigate back or forward.

The disadvantage of using driver.navigate() is that if your next step is trying to identify a webelement it might fail as driver.navigate().to() will not wait for the page to load.

Comments

Popular posts from this blog

Jenkins CICD in One Page

Why do we need a build tool?

Deutsche Bank Interview Questions - 2024