WebDriver Browser Commands


The Browser commands are generally the ones which we intuitively feel that a browser should control. Examples are “type url and hit enter”, “getTitle”,”back”,”forward” and so on. Read on to find out what Selenium provides



  1. Print browser name
  2. Print browser ready state
  3. Perform back, forwards and refresh browser operations


1. GoTo (Go to a URL)


2. Browsername


3. Browser back

4. Browser forward

5. Browser refresh

6. Browser title

7. Browser current url


1. Open the features in pycharm



2. The corresponding step_definitions are as follows




3. Now copy the below gherkin code in “browser_commands.feature”


4. Now right-click on the steps folder and create a new file “browser_commands.py” 





Browser Commands