In my Selenium-Test
(with chromedriver-2.24
) I\'m trying to access my webpage via basic authentication with the following statement:
The basic authentication via url is blocked only for sub resources. So you could still use it on the domain:
driver.get("http://admin:admin@localhost:8080");
driver.get("http://localhost:8080/project");
You could also create a small extension to automatically set the credentials when they are requested:
options = webdriver.ChromeOptions()
options.add_extension(r'C:\dev\credentials.zip')
https://gist.github.com/florentbr/25246cd9337cebc07e2bbb0b9bf0de46