Introduction to WebDriver Commands

Selenium provide instruction to open an URL, click on the button, type in textbox, select dropdown option, and perform many actions such as closing the browser etc. These are achieved through command operations available in Selenium WebDriver.

Let’s see now how to use the methods provided by the WebDriver.

First step is to load the webdriver jar files into your project. 

Second step is to instantiate a browser class. Selenium have to make an instance of a webdriver to handle browser commands.

Third step is to use the driver object followed by dot(.) key, then all the possible methods of webdriver get display to use.

WebDriver Commands

Whereas, syntax of each methods describes:

WebDriver commands are mainly classified into:
  1. Browser commands
  2. Navigation commands
  3. Browser cookie and Windows commands
  4. WebElement commands