click on back button

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

click on back button

srinithya
how to click on back button on in firefox using selenium webdriver?
Reply | Threaded
Open this post in threaded view
|

Re: click on back button

softwaretestingforum
Administrator
driver.navigate.back()

You could find more usage of navigation method here - http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: click on back button

mfsi_sitamj
In reply to this post by srinithya
Hi srinithya,


Using selenium we can not access windows application. So, we can not directly click on the back button. But, we can do one thing that will serve our purpose :-

WebDriver driver = new FirefoxDriver();
driver.navigate("http://www.flipkart.com/");
driver.findElement(By.xpath("//*[@id='fk-pp-carousel-']/li[1]/a/div")).click();
Thread.sleep(10000L);
driver.navigate.back();

The driver.navigate.back() will serve your purpose.


Thanks and regards
Sitam