如何设置可执行IE 11驱动程序的路径 [英] how to set path for executable IE 11 drivers

查看:132
本文介绍了如何设置可执行IE 11驱动程序的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Selenium的新手我正在尝试将HP ALM与Selenium集成。我试图在IE 11中启动HP ALM。我没有为IE11获得正确的webdrivers。
以下是错误:

I am New to Selenium I'm trying to Integrate HP ALM with Selenium. I am trying to Launch HP ALM in IE 11. I'm not getting correct webdrivers for IE11. The Following is Error:


FAILED CONFIGURATION:@BeforeClass Init
java.lang.IllegalStateException:路径到驱动程序可执行文件
必须由webdriver.ie.driver系统属性设置;有关
的更多信息,请参阅
https://github.com/SeleniumHQ/硒/维基/ InternetExplorerDriver
最新版本可从
下载 http:// selenium- release.storage.googleapis.com/index.html at
com.google.common.base.Preconditions.checkState(Preconditions.java:197)
at
org.openqa .selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
at
org.openqa.selenium.ie.InternetExplorerDriverService.access $ 0(InternetExplorerDriverService.java:1)
at
$ org.openqa.selenium.ie.InternetExplorerDriverService Builder.findDefaultExecutable(InternetExplorerDriverService.java:167)
。在
$ org.openqa.selenium.remote.service.DriverService Builder.build(DriverService的.java:296)在
org.openqa.selenium.ie.InternetExplorerDriver.setupService
(InternetExplorerDriver.java:251)
。在
org.openqa.selenium.ie.InternetExplorerDriver 。(InternetExplorerDriver.java:172)
at
org.openqa .selenium.ie.InternetExplorerDriver。(InternetExplorerDriver.java:146)
at database.Test1.Init(Test1.java:23)at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at
$ b sun.reflect.NativeMethodAccessorImpl.invoke(未知来源)
$. $ b java.lang.reflect.Method.invoke(未知来源)
sun.reflect.DelegatingMethodAccessorImpl.invoke(未知来源) $ b org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
。在
org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510)
。在组织。 testng.internal.Invoker.invokeConfigurations(Invoker.java:211)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at
org.testng.internal。 TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:170)
。在
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104)
在org.testng.TestRunner.privateRun(TestRunner的。 JAV a:773)
org.testng.TestRunner.run(TestRunner.java:623)at
org.testng.SuiteRunner.runTest(SuiteRunner.java:357)at
org.testng .SuiteRunner.runSequentially(SuiteRunner.java:352)在
org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)在
org.testng.SuiteRunner.run(SuiteRunner.java:259)在
org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)在
org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)在
org.testng.TestNG.runSuitesSequentially( TestNG.java:1185)
org.testng.TestNG.runSuitesLocally(TestNG.java:1110)at
org.testng.TestNG.run(TestNG.java:1018)at
org .teng.remote.RemoteTestNG.run(RemoteTestNG.java:111)at
org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)at
org.testng.remote.RemoteTestNG.main (RemoteTestNG.java:175)

FAILED CONFIGURATION: @BeforeClass Init java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://selenium-release.storage.googleapis.com/index.html at com.google.common.base.Preconditions.checkState(Preconditions.java:197) at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109) at org.openqa.selenium.ie.InternetExplorerDriverService.access$0(InternetExplorerDriverService.java:1) at org.openqa.selenium.ie.InternetExplorerDriverService$Builder.findDefaultExecutable(InternetExplorerDriverService.java:167) at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296) at org.openqa.selenium.ie.InternetExplorerDriver.setupService(InternetExplorerDriver.java:251) at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:172) at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:146) at database.Test1.Init(Test1.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:211) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138) at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:170) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104) at org.testng.TestRunner.privateRun(TestRunner.java:773) at org.testng.TestRunner.run(TestRunner.java:623) at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185) at org.testng.TestNG.runSuitesLocally(TestNG.java:1110) at org.testng.TestNG.run(TestNG.java:1018) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

浏览到提供错误的网络论坛后。我收到了上述错误。专家能否帮我解决这个问题。此外,我还需要使用Selenium在QC中运行测试集的指南。

After browsing to the webforums giving in the Error. I am getting the above error. Could the experts help me with this issue. Also I would be requiring the guidelines for running test sets in QC using Selenium.

推荐答案

错误消息(几乎)准确地告诉您怎么做:

The error message tells you (almost) exactly what to do:


驱动程序可执行文件的路径必须由
webdriver.ie.driver系统属性设置;有关详细信息,请参阅
https://github.com/SeleniumHQ/selenium/wiki/ InternetExplorerDriver
最新版本可从 http://selenium-release.storage下载。 googleapis.com/index.html

下载最新的IE驱动程序服务器(64或32位 - 这很重要)来自 http://selenium-release.storage.googleapis.com/index .html?path = 2.49 / ,按照说明运行它,然后简单地执行:

Download the latest IE Driver server (64 or 32 bit - this is important) from http://selenium-release.storage.googleapis.com/index.html?path=2.49/, get it running according to the instructions, and then simply do:

System.setProperty("webdriver.ie.driver", "<your download location>");

WebDriver参考。

in your @BeforeClass before you create your WebDriver reference.

这篇关于如何设置可执行IE 11驱动程序的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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