Book Image

Selenium Essentials

By : Prashanth Sams
Book Image

Selenium Essentials

By: Prashanth Sams

Overview of this book

Table of Contents (12 chapters)


Page navigation kicks in from the start of test execution; it is a fundamental task for each and every use case, especially to browse through the history and navigate backwards and forward. Let's discuss Selenium navigation functions, as follows:

  • The get() function commands the browser to navigate to the URL. In general, the get() function is used to open a web page on every test execution. The onload event lets the browser wait until the complete page is loaded. If the page is overloaded with lots of Ajax calls, there will be delays on page load. The following is the syntax for this function:

  • The navigate().back() function lets the browser navigate backwards. The following is the syntax for this function:


    Here is an alternative method using keyboard actions to navigate web browser history.

    Actions actions = new Actions(driver);
  • The navigate().forward() function allows the browser to navigate forward...