This fixes #494
Allow URLS that start with ://
for the open(URL)
method
If you copy/paste a URL such as ://google.com
into a web browser, the browser automatically converts the URL to https://google.com
. But if you use the webdriver get(URL)
method for URLs that start with ://
, you'll get the following error:
selenium.common.exceptions.WebDriverException:
Message: unhandled inspector error:
{"code":-32000,"message":"Cannot navigate to invalid URL"}
Now the SeleniumBase open(URL)
method (which wraps driver.get
) automatically adds the https
to URLs that start with ://
to prevent the error.
As a bonus, you can now make your Python code lines 5 characters shorter if they use the open(URL)
method for https
URLs.