我是Selenium的新手我试图将HP ALM与Selenium集成。我试图在IE 11中启动HP ALM。我没有为IE11获得正确的webdrivers。 以下是错误:
FAILED CONFIGURATION:@BeforeClass Init java.lang.IllegalStateException:驱动程序可执行文件的路径 必须由webdriver.ie.driver系统属性设置;更多 信息,见 https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver。 最新版本可以从中下载 http://selenium-release.storage.googleapis.com/index.html at com.google.common.base.Preconditions.checkState(Preconditions.java:197) 在 org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109) 在 org.openqa.selenium.ie.InternetExplorerDriverService.access $ 0(InternetExplorerDriverService.java:1) 在 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) 在 org.openqa.selenium.ie.InternetExplorerDriver。(InternetExplorerDriver.java:146) 在database.Test1.Init(Test1.java:23)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(未知来源)at sun.reflect.DelegatingMethodAccessorImpl.invoke(未知来源)at java.lang.reflect.Method.invoke(未知来源)at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) 在 org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510) 在org.testng.internal.Invoker.invokeConfigurations(Invoker.java:211) 在org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138) 在 org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:170) 在 org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104) 在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 at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)at 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 at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)at at org.testng.TestNG.run(TestNG.java:1018)at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)at at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)at at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
浏览到提供错误的网络论坛后。我收到了上述错误。专家能否帮我解决这个问题。此外,我还需要使用Selenium在QC中运行测试集的指南。
答案 0 :(得分:0)
错误消息告诉您(几乎)准确地做什么:
驱动程序可执行文件的路径必须由 webdriver.ie.driver系统属性;有关更多信息,请参阅 https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver。 最新版本可以从http://selenium-release.storage.googleapis.com/index.html
下载
从http://selenium-release.storage.googleapis.com/index.html?path=2.49/下载最新的IE驱动程序服务器(64位或32位 - 这很重要),按照说明运行,然后执行:
System.setProperty("webdriver.ie.driver", "<your download location>");
在创建WebDriver参考之前,在@BeforeClass
中。