Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix driver location support when run on windows and cygwin is in the path. #645

Merged
merged 2 commits into from
Mar 4, 2021

Conversation

jtnord
Copy link
Member

@jtnord jtnord commented Feb 19, 2021

if Cygwin was on the path which would work and return a cygwin path -
and those are not executable on windows..

e.g. fix the following:

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
2.293 s <<< FAILURE! - in core.FormValidationTest
[ERROR] validate(core.FormValidationTest)  Time elapsed: 2.254 s  <<<
ERROR!
com.google.inject.ProvisionException:
Unable to provision, see the following errors:

1) Error in custom provider, java.lang.IllegalStateException: The driver
   executable does not exist: C:\cygdrive\c\tools\geckodriver
     at
     org.jenkinsci.test.acceptance.FallbackConfig.createWebDriver(FallbackConfig.java:293)
     (via modules: org.jenkinsci.test.acceptance.guice.World ->
     com.google.inject.util.Modules$OverrideModule ->
     com.google.inject.util.Modules$OverrideModule ->
     org.jenkinsci.test.acceptance.FallbackConfig)
       at
       org.jenkinsci.test.acceptance.FallbackConfig.createWebDriver(FallbackConfig.java:293)
       (via modules: org.jenkinsci.test.acceptance.guice.World ->
       com.google.inject.util.Modules$OverrideModule ->
       com.google.inject.util.Modules$OverrideModule ->
       org.jenkinsci.test.acceptance.FallbackConfig)
         while locating org.openqa.selenium.WebDriver

if Cygwin was on the path `which` would work and return a cygwin path -
and those are not executable on windows..

e.g. fix the following:

```
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
2.293 s <<< FAILURE! - in core.FormValidationTest
[ERROR] validate(core.FormValidationTest)  Time elapsed: 2.254 s  <<<
ERROR!
com.google.inject.ProvisionException:
Unable to provision, see the following errors:

1) Error in custom provider, java.lang.IllegalStateException: The driver
   executable does not exist: C:\cygdrive\c\tools\geckodriver
     at
     org.jenkinsci.test.acceptance.FallbackConfig.createWebDriver(FallbackConfig.java:293)
     (via modules: org.jenkinsci.test.acceptance.guice.World ->
     com.google.inject.util.Modules$OverrideModule ->
     com.google.inject.util.Modules$OverrideModule ->
     org.jenkinsci.test.acceptance.FallbackConfig)
       at
       org.jenkinsci.test.acceptance.FallbackConfig.createWebDriver(FallbackConfig.java:293)
       (via modules: org.jenkinsci.test.acceptance.guice.World ->
       com.google.inject.util.Modules$OverrideModule ->
       com.google.inject.util.Modules$OverrideModule ->
       org.jenkinsci.test.acceptance.FallbackConfig)
         while locating org.openqa.selenium.WebDriver
```
@jtnord jtnord added the fix label Feb 19, 2021
@jtnord jtnord merged commit cd78f2d into jenkinsci:master Mar 4, 2021
@jtnord jtnord deleted the fix-driver-location-on-windows branch March 4, 2021 15:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants