Ale*_*lex 11 python selenium internet-explorer selenium-webdriver
我正在尝试使用python-selenium API(版本2.53.6)在不同的浏览器上执行GUI测试.当我尝试以下列方式使用IE(11.0.10240)时(Windows Server 2012 R2 Standard,64bit); 使用身份验证
driver = webdriver.Ie()
driver.get("http://user:password@my.test.server.com")
Run Code Online (Sandbox Code Playgroud)
然后我收到以下错误消息:
selenium.common.exceptions.WebDriverException: Message: Failed to navigate to http://user:password@my.test.server.com. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed.
Run Code Online (Sandbox Code Playgroud)
有没有办法解决这个错误?
附录:
没有直接回答这个问题,但是当我通过 BrowserStack 在 Windows 10 上使用 IE11 并打开此 http 身份验证保护页面时,无法重现它:
from selenium import webdriver
desired_cap = {'os': 'Windows', 'os_version': '10', 'browser': 'IE', 'browser_version': '11.0'}
driver = webdriver.Remote(
command_executor='http://usename:key@hub.browserstack.com:80/wd/hub',
desired_capabilities=desired_cap)
driver.get("http://httpwatch:password1@www.httpwatch.com/httpgallery/authentication/authenticatedimage/default.aspx?0.7349707232788205")
Run Code Online (Sandbox Code Playgroud)
没有错误,我看到了 HTTP 身份验证背后的图像。
使用硒 2.53.5。
| 归档时间: |
|
| 查看次数: |
823 次 |
| 最近记录: |