IE11 Selenium WebDriverException:导航失败。 (org.openqa.selenium.WebDriverException ... IWebBrowser2 :: Navigate2()失败 [英] IE11 Selenium WebDriverException: Failed to navigate. (org.openqa.selenium.WebDriverException ...IWebBrowser2::Navigate2() failed

查看:293
本文介绍了IE11 Selenium WebDriverException:导航失败。 (org.openqa.selenium.WebDriverException ... IWebBrowser2 :: Navigate2()失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是自动化测试的新手,尽管我的Selenium测试在Chrome和Firefox上运行,但它们不在IE11上运行。我做了下面详细介绍的所有检查,但仍然遇到这个错误:



org.openqa.selenium.WebDriverException:无法导航至 http:// myapp 。这通常意味着对COM方法IWebBrowser2 :: Navigate2()的调用失败。



我首先进行了所需的配置,如
https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration )。



我已尝试按照在IE中:org.openqa.selenium.WebDriverException:这通常意味着对COM方法IWebBrowser2 :: Navigate2( )
到HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE中添加新的DWORD值,名称为iexplore.exe,值为0,如 https:// stackoverflo w.com/users/80779/lordofthepigs



我还尝试介绍了https://stackoverflow.com/users/4210466/karunakar-sapogu
new_window = self.driver.window_handles [1]

self.driver.switch_to_window(new_window)
但是我似乎没有正确介绍它,因为我遇到了Java错误。



有人用Java解决了这个问题吗? ?您能给我逐步的指导吗? (请记住,我是新手,并且对Java的知识有限。)



非常感谢!

解决方案

1)您确定您的IEdriver实例正在运行吗?



2)您使用的是IEdriver x64还是IEDriver x86? p>

即使使用x64 Windows,在大多数情况下,您也可以使用Internet exxporer x86。请尝试使用x86驱动程序,并尝试重现这种行为


I am new to automated testing and, though my Selenium tests are running on Chrome and Firefox, they are not running on IE11. I did all the checks I detail below, but I keep on bumping into this error:

org.openqa.selenium.WebDriverException: Failed to navigate to http://myapp. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed.

I did first the required configuration as in https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration) .

I have tried editing my registry as suggested at In IE: org.openqa.selenium.WebDriverException: This usually means that a call to the COM method IWebBrowser2::Navigate2() failed to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE add a new DWORD value with the name iexplore.exe and the value 0, as described by https://stackoverflow.com/users/80779/lordofthepigs

I also tried introducing the piece of code suggested by https://stackoverflow.com/users/4210466/karunakar-sapogu : new_window = self.driver.window_handles[1]
self.driver.switch_to_window(new_window) But I seem not to be introducing it right because I got java errors.

Has anyone solved this problem in Java? Could you give me step by step instructions? (keep in mind that I am new and have limited Java knowledge).

Thank you so much!

解决方案

1) Are you sure that is your IEdriver instance run?

2) Did you use IEdriver x64 or IEDriver x86?

Even if you use x64 windows, in most cases you use internet exlporer x86. Please, try x86 driver and try to reproduce such behavior

这篇关于IE11 Selenium WebDriverException:导航失败。 (org.openqa.selenium.WebDriverException ... IWebBrowser2 :: Navigate2()失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆