2016-01-22 94 views
1

我是Selenium的新手我試圖將HP ALM與Selenium集成。我試圖在IE 11中啓動HP ALM。我沒有獲得適用於IE11的正確webdrivers。 以下是錯誤:如何設置可執行IE 11驅動程序的路徑

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)

瀏覽到webforums在錯誤發出後。我收到上述錯誤。專家能幫我解決這個問題嗎?另外我會要求使用Selenium在QC中運行測試集的指導原則。

回答

0

錯誤消息告訴你(幾乎)到底該怎麼做:

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

下載最新的IE驅動程序服務器(64位或32位 - 這很重要)從http://selenium-release.storage.googleapis.com/index.html?path=2.49/,它運行根據指示得到,然後簡單地做:

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

@BeforeClass創建您的webdriver引用之前。

相關問題