JBehave で Serenity を使用しています。どのドライバーを開始するかを構成するには、「serenity.properties」ファイルとドライバーの標準の serenity プロパティを使用します。
webdriver.driver= ieexplorer webdriver.chrome.driver=ドライバー
/chromedriver.exe
webdriver.ie.driver=ドライバー\IEDriverServer.exe
webdriver.driver プロパティを「firefox」または「chrome」に設定すると、すべて正常に動作し、テストが期待どおりに実行されます。しかし、IE ブラウザーを使用しようとすると、開かれず、例外が発生します。
ERROR net.thucydides.core.webdriver.WebDriverFacade - FAILED TO CREATE NEW WEBDRIVER_DRIVER INSTANCE class org.openqa.selenium.ie.InternetExplorerDriver: Could not instantiate class org.openqa.selenium.ie.InternetExplorerDriver
net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.ie.InternetExplorerDriver
at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:209)<br>
at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:142)<br>
at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:133)<br>
at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:103)<br>
at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:178)<br>
at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:173)<br>
at ua.dataart.pages.LoginPage.openBaseUrl(LoginPage.java:59)<br>
at ua.dataart.steps.serenity.RegistrationSteps.regPage_is_opened(RegistrationSteps.java:20)<br>
at ua.dataart.steps.serenity.RegistrationSteps$$EnhancerByCGLIB$$76672e1c.CGLIB$regPage_is_opened$3(<generated>)<br>
at ua.dataart.steps.serenity.RegistrationSteps$$EnhancerByCGLIB$$76672e1c$$FastClassByCGLIB$$dcecc188.invoke(<generated>)<br>
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)<br>
at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:369)<br>
at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:354)<br>
at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:329)<br>
at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:134)<br>
at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61)<br>
at ua.dataart.steps.serenity.RegistrationSteps$$EnhancerByCGLIB$$76672e1c.regPage_is_opened(<generated>)<br>
at ua.dataart.steps.RegistrationAndLoginSteps.registrationPageIsOpened(RegistrationAndLoginSteps.java:54)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:498)<br>
at org.jbehave.core.steps.StepCreator$ParametrisedStep.perform(StepCreator.java:599)<br>
at org.jbehave.core.embedder.PerformableTree$FineSoFar.run(PerformableTree.java:340)<br>
at org.jbehave.core.embedder.PerformableTree$PerformableSteps.perform(PerformableTree.java:1072)<br>
at org.jbehave.core.embedder.PerformableTree$AbstractPerformableScenario.performRestartableSteps(PerformableTree.java:938)<br>
at org.jbehave.core.embedder.PerformableTree$NormalPerformableScenario.perform(PerformableTree.java:977)<br>
at org.jbehave.core.embedder.PerformableTree$PerformableScenario.perform(PerformableTree.java:887)<br>
at org.jbehave.core.embedder.PerformableTree$PerformableStory.performScenarios(PerformableTree.java:811)<br>
at org.jbehave.core.embedder.PerformableTree$PerformableStory.perform(PerformableTree.java:784)<br>
at org.jbehave.core.embedder.PerformableTree.performCancellable(PerformableTree.java:416)<br>
at org.jbehave.core.embedder.PerformableTree.perform(PerformableTree.java:387)<br>
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:291)<br>
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:265)<br>
at java.util.concurrent.FutureTask.run(FutureTask.java:266)<br>
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>
at java.lang.Thread.run(Thread.java:745)<br>
**Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property;** <br>
for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. <br>
The latest version can be downloaded from http://selenium-release.storage.googleapis.com/index.html<br>
at com.google.common.base.Preconditions.checkState(Preconditions.java:197)<br>
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)<br>
at org.openqa.selenium.ie.InternetExplorerDriverService.access$000(InternetExplorerDriverService.java:32)<br>
at org.openqa.selenium.ie.InternetExplorerDriverService$Builder.findDefaultExecutable(InternetExplorerDriverService.java:167)<br>
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)<br>
at org.openqa.selenium.ie.InternetExplorerDriver.setupService(InternetExplorerDriver.java:251)<br>
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:172)<br>
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:150)<br>
at net.thucydides.core.webdriver.WebdriverInstanceFactory.newInternetExplorerDriver(WebdriverInstanceFactory.java:123)<br>
at net.thucydides.core.webdriver.WebDriverFactory.internetExplorerDriver(WebDriverFactory.java:564)<br>
at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:188)<br>
... 37 more
Given user is on the registration page (FAILED)<br>
(net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.ie.InternetExplorerDriver)<br>
Selenium テストに同じ IE ドライバーをいくつかの機能設定で使用していますが、正常に動作します。
あらゆる種類の助けをいただければ幸いです。