在IE中:org.openqa.selenium.WebDriverException:这通常意味着调用COM方法IWebBrowser2 :: Navigate2()失败 [英] In IE: org.openqa.selenium.WebDriverException: This usually means that a call to the COM method IWebBrowser2::Navigate2() failed

查看:875
本文介绍了在IE中:org.openqa.selenium.WebDriverException:这通常意味着调用COM方法IWebBrowser2 :: Navigate2()失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Selenium为我的Web应用程序编写测试用例。当我从Firefox运行测试时,它工作正常,但是当我尝试从IE运行它时,我无法运行并收到错误消息:

I am using Selenium to write test cases for my web application. When I run the test from Firefox it's working fine, but when I try to run it from IE I am not able to run and I get the error message:


这通常意味着调用COM方法IWebBrowser2 :: Navigate2()失败异常。

This usually means that a call to the COM method IWebBrowser2::Navigate2() failed exception.



System.setProperty("webdriver.ie.driver", "browserdrivers/IEDriverServer.exe");
WebDriver web =  new InternetExplorerDriver();
web.get("URL");

我能够看到IE屏幕,但它没有导航到该URL,我正在超越异常。我该如何解决这个问题?

I am able to see IE screen but it's not navigating to that URL, and I am getting above exception. How can I resolve this ?

推荐答案

您必须将每个区域的保护模式设置设置为Internet Explorer中的相同值。希望以下链接可能对您有所帮助。

You must set the Protected Mode settings for each zone to be the same value in the Internet Explorer. Hope the below link may be helpful to you.

NoSuchElementException

NoSuchElementException is occurred during implementation of InternetExplorerDriver in Selenium WebDriver

问候,

Vignesh

这篇关于在IE中:org.openqa.selenium.WebDriverException:这通常意味着调用COM方法IWebBrowser2 :: Navigate2()失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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