New answers tagged


If you try to open a URL without http or https (for e.g. driver.get(“”);), get() method will throw an error “org.openqa.selenium.WebDriverException“. It will also gives error message as “Cannot navigate to invalid URL”.


This question is about WebDriver W3C specification. As per the specification any implementation has to follow: If url is not an absolute URL or is not an absolute URL with fragment or not a local scheme, return error with error code invalid argument.


I think it is a stupid question to ask in an interview, because it asks a very specific detail of how to use WebDriver that I have not really thought about in the 10 years I am using Selenium, but this might a great answer: I don't know, but I could try and see what happens. Why do you ask? Did you have problems with this in the past? I have just tried ...

Top 50 recent answers are included