sbtqa / page-factory-2

Page factory framework for java test automation. Web/API/Mobile
https://sbtqa.github.io/
Other
56 stars 30 forks source link

Driver service can't find the IE executable when we setting the webdriver.drivers.path property #56

Closed MeSaNei closed 5 years ago

MeSaNei commented 6 years ago

I'm trying to migrate from page-factory 1.11.0 to page-factory2 2.0.0.

I'm getting: [INFO] sbtqa.tag.pagefactory.web.drivers.WebDriverService - Attempt 1 to start web driver 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:847) at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124) at org.openqa.selenium.ie.InternetExplorerDriverService.access$000(InternetExplorerDriverService.java:32) at org.openqa.selenium.ie.InternetExplorerDriverService$Builder.findDefaultExecutable(InternetExplorerDriverService.java:167) at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:339) at org.openqa.selenium.ie.InternetExplorerDriver.setupService(InternetExplorerDriver.java:291) at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:213) at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:160) at ru.sbtqa.tag.pagefactory.web.drivers.WebDriverService.createDriver(WebDriverService.java:92) at ru.sbtqa.tag.pagefactory.web.drivers.WebDriverService.mountDriver(WebDriverService.java:56) at ru.sbtqa.tag.stepdefs.CoreSetupSteps.setUp(CoreSetupSteps.java:36) at ru.sbtqa.tag.stepdefs.ru.CoreStepDefs.setUp(CoreStepDefs.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at cucumber.runtime.Utils$1.call(Utils.java:31) at cucumber.runtime.Timeout.timeout(Timeout.java:16) at cucumber.runtime.Utils.invoke(Utils.java:25) at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60) at cucumber.runtime.HookDefinitionMatch.runStep(HookDefinitionMatch.java:17) at cucumber.runner.UnskipableStep.executeStep(UnskipableStep.java:22) at cucumber.api.TestStep.run(TestStep.java:83) at cucumber.api.TestCase.run(TestCase.java:58) at cucumber.runner.Runner.runPickle(Runner.java:80) at cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:140) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:118) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:56) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:127) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

My application.properties: `

COMMON BLOCK

mobile or web

driver.environment = web

path to page objects

page.package = ru.sbtqa.xxxx.yyyy.zzzz

default wait timeout in milliseconds

page.load.timeout = 60000

optional. Using aspect in tests. False by default.

page.aspect.disabled = false

optional. false by default

video.enabled = false video.path.dest = /tmp/video video.path.temp = /tmp/video video.highlight.enabled = false

optional. driver or raw. Raw by default

screenshot.strategy = raw

optional. tasks to kill before test (ONLY FOR WINDOWS)

tasks.to.kill = iexplorer

IN CASE OF WEB

parameters for web driver create

webdriver.browser.name = IE webdriver.starting.url = http://xxxxxxx.vm.mos.cloud.sbrf.ru/ui/

optional. The number of start attempts webdriver. 3 by default

webdriver.create.attempts = 3

optional. If path is not specified webdrivers will be searched in system PATH

webdriver.drivers.path = src/test/resources/webdrivers/ ` Exception is thrown from selenium-remote-driver/3.11.0/selenium-remote-driver-3.11.0-sources.jar!/org/openqa/selenium/remote/service/DriverService.java:117 In method findExecutable

It is looking for a IE executable(IEDriverServer with several executable extensions) in PATH and trying to find path by System,getProperty "webdriver.ie.driver" which is empty.

MeSaNei commented 6 years ago

I also tried to set the webdriver.browser.path. No luck either.