InterviewSolution
| 1. |
What are the different types of navigation commands? |
|
Answer» Navigation commands enable selenium to open a new web PAGE URL, navigate to other page links available on the web page by clicking on that LINK or can navigate to Back or FORWARD or can refresh the webpage content again. Following are some types of navigation commands: 1) navigate().to(): This command is same like get() command, it opens a new BROWSER and will find the URL specified by the user. e.g. driver.navigate().to(“https://google.co.in/”); 2) navigate().forward(): This command is used to navigates to next page travelled by the user and is available in the browser history. e.g. driver.navigate().forward(); 3) navigate().back(): This command is used to navigates to back page user travelled from and is available in the browser history. e.g. driver.navigate().back(); 4) navigate().refresh():This command is used to refresh the CURRENT web page. All the web page content get reloaded again e.g. driver.navigate().refresh(); |
|