w3azcq
Last Updated: February 25, 2016
·
1.313K
· arrblair
Screen shot 2012 09 27 at 2.53.57 pm

Navigate WebDriver Browser Instance Through HTTP Basic Authentication

WebDriver doesn't have the ability to interact with most things in the browser that fall outside of the DOM. Due to this limitation, HTTP Basic Authentication is a frequent stumbling block. I've often gotten past this by passing in an authorized username & password prepended to the URL.

# uses the Python bindings for Selenium WebDriver
driver = webdriver.Chrome()
driver.get("http://username:password@AuthProtectedURL")
Say Thanks
Respond