Closed drkstr101 closed 2 years ago
Can you put a breakpoint in DriverServiceExecutable
(in the checkExecutable() method) to see what path it is trying to use?
The value in debugger is same as the relative path set in serenity.conf, but does not include the absolute base path, as shown in the error message.
net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (Unable to find executable for: C:\Users\aarmiller\Workspace\aarmiller\serenity-examples\src\test\resources\webdriver\window\chromedriver.exe at net.thucydides.showcase.junit.steps.serenity.BuyerSteps.opens_home_page(BuyerSteps.java:24) at net.thucydides.showcase.junit.features.cart.AddItemsToCartTest.add_item_to_cart(AddItemsToCartTest.java:25)
After running a few more tests, I've realized the issue is actually with Gradle (possibly others?) multi-project builds, where the serenity project is not also the root project.
https://scans.gradle.com/s/kyc2rzaebyati/ [good] https://scans.gradle.com/s/qnep3uitzd6bs/ [bad]
The failed build was kicked off from the gradle wrapper in root project, while the good one was run directly from the sub-project directory.
I have noticed some other strange behavior when running Gradle builds from a parent wrapper, but this is the only thing I can consistently reproduce. You may want to consider this case during your normal course of release tests.
Cheers!
I posted my example project if you are interested:
Sorry to double post, but I realize I was not very clear on what the actual issue is.
There appears to be no way (that I know of) to reference the webdriver binaries using a relative path, provided the project under test is not the top level project (in Gradle at least). However, using the relative path from rootDir
yields the correct path to the executable in the INFO log output. Regardless, it will report the file as missing unless absolute path is set in serenity.conf.
Hello,
But...
Serenity seems to think provided chromedriver in
serenity-cucumber-starter
project is missing when it is there and executable from the provided absolute path in he debug message. Is this possibly related to Windows path issue #1644?Cheers and thank you!