# Navigation

**Selenium Navigation Methods**

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

<figure><img src="http://www.swtestacademy.com/wp-content/uploads/2015/12/navigation-1.jpg" alt=""><figcaption></figcaption></figure>

## `get()` Method

The `get()` method is used to open a URL in the current browser window. When you call the `get()` method, the browser will navigate to the specified URL and load the page.

## `navigate().to()` Method

The `navigate().to()` method is used to navigate to a new URL in the current browser window. When you call the `navigate().to()` method, the browser will navigate to the new URL, but it will not reload the page.

### Differences between `get()` and `navigate().to()` Method

* The `get()` method loads a URL and loads the page, while the `navigate().to()` method navigates to a new URL without reloading the page.
* The `get()` method is typically used to open a new browser window, while the `navigate().to()` method is typically used to navigate to a new page within the same browser window.
* The `get()` method is a part of the `WebDriver` interface, while the `navigate().to()` method is part of the `Options` interface.

In summary, the `get()` method and `navigate().to()` method are both used to navigate to a URL, but they have different functionalities. The `get()` method will load the page while the `navigate().to()` method will not reload the page.

## **.navigate.back()**

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

## **.navigate.forward()**

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

## **.navigate.refresh()**

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