Header Ads

WHAT IS DIFFERENCE BETWEEN GET AND NAVIGATE TO OPEN A WEBPAGE IN SELENIUM WEBDRIVER?





Normally we are used following code to open a webpage in Selenium Webdriver script:
driver.get("http://helloselenium.blogspot.com");




In the above code WebDriver will wait until the page has fully loaded (that is, the onload event has fired) before returning control to script.
We can also open the webpage using following code:
driver.navigate().to("http://helloselenium.blogspot.com");
In the above code WebDriver do exactly the same thing as get() command. This one is just a lot easier to type than the other.





No comments


What would you like to add in my list? I look forward to reading your comments below.



Powered by Blogger.