Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.
WebDriver's driver.navigate() method provides some basic Browser Navigation Commands, such as back() and forward(), that allows the browser to move backward or forwards in the browser's history. Just like other WebDriver methods, we can also access these navigation methods by typing driver.navigate() in the Eclipse panel.
This method loads a new web page in the existing browser window. It accepts String as a parameter and returns void. The respective command can be written as:
driver.navigate().to("www.lambdatest.com");In WebDriver, the clickForward() method enables you to click on the forward button in an existing browser window. It does not accept any arguments and does not return any value. The following command takes you forward by one page in the browser's history:
driver.navigate().forward();You can use the command WebDriver.get() to go backward by one page on the browser's history. This method allows you to click on the back button in the existing browser window. This method neither accepts anything nor returns anything. This syntax for this command is as follows:
driver.navigate().back();The WebDriver's refresh method reloads the current web page in the existing one. The syntax for the command is as follows:
driver.navigate().refresh();Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.
Start Free TestingEarn resume-worthy Selenium certifications that help you land a top job.
Learn MoreTest orchestration and execution cloud of 3000+ browsers and OS
24/7 support
Enterprise grade security
Fastest test execution cloud