Tuesday 8 July 2014

How to navigate URL, Back and forward using selenium webdriver


-> Navigate URL

If we want to naviagte another URL from current URL then we can use below commands for navigate URL.

driver1.navigate().to("www.gmail.com")


-> Back

If we want to back from the current URL same as click "back" button in browser, then we can use below commands.

driver1.navigate().back();


-> forward


If we want to forward from the current URL same as click "forward" button in browser, then we can use below commands.

driver1.navigate().back();

No comments:

Post a Comment