Browsers provide various navigation methods to access web pages from the browser history or by refreshing the current page with the back, forward, and refresh/reload buttons on the browser window's toolbar. The Selenium WebDriver API provides access to these buttons with various methods of WebDriver.Navigation
interface. We can test the behavior of the application when these methods are used.
Method |
Description |
---|---|
| |
| |
| |
|
This method loads the specified URL in the current browser window. |
In this recipe, we will see browser navigation methods.
Create a new test that will get an instance of WebDriver
, navigate to a site, and perform some basic actions and verifications.