driver.switchTo().defaultContent()
0 Comments
driver.switchTo().alert().dismiss(); driver.switchTo().alert().accept(); close() - It is used to close the browser or page currently which is having the focus.
quit() - It is used to shut down the web driver instance or destroy the web driver instance(Close all the windows). driver.navigate.to(newURL)
driver.switchTo().alert().sendKeys("Hello"); Confirmation boxes and Alerts are handled in same way in driver.
get("http://www.google.com") - navigate to a Web page. Webdriver will wait until the page has fully loaded before returning control to script.
navigate().to("http://www.google.com") - It also navigate to a web page. Conclusion :- navigate().to() and get() do exactly the same thing. The navigate interface also provides the ability to move backwards and forwards in your browser’s history:
|