In this post we will dive into what webdriver API does in terms of navigation. Navigation is the first part of Webdriver API and we will cover all navigation methods such as .get(<url>), .navigate.to, .navigate.back(), .navigate.forward(), etc…


This post is designed for beginners who have little or no automation experience. At the end of this tutorial, you will have knowledge on Selenium Webdriver Navigation features.


Nice to have: Before starting to read this post it is better to read previous selenium tutorials.

Selenium Webdriver Navigation Methods

Navigation methods is shown below figure. In this post I will go with method explanations then show their examples and usage.


.get (URL)

We can go to any URL with driver.get(“http://www.teknosa.com”) command.


We can go to any URL with driver.navigate().to(“http://www.teknosa.com”) command.


We can go back to previous page with driver.navigate().back() command.


We can go forward from current page to last opened page with driver.navigate().next() command.


We can refresh the webpage with driver.navigate().refresh() command.

Navigation Example

Important Note:
Navigation of webdriver halts until the HTML of page is fully loaded but javascript is not included in this context. Thus, in some cases synchronization is required for error prone manipulation and interrogation.