Browser navigation

The first thing you will want to do after launching a browser is to open your website. This can be achieved in a single line:

//Convenient
driver.get("https://selenium.dev")

//Longer way
driver.navigate().to("https://selenium.dev")
  

Back

Pressing the browser’s back button:

driver.navigate().back() 

Forward

Pressing the browser’s forward button:

driver.navigate().forward()

Refresh

Refresh the current page:

driver.navigate().refresh()