Closed vklonin closed 2 years ago
In other words - calling wdm.setup() and having it done successfully we would expect to have driver downloaded and ready for use. But in current webdrivermanager implementation - it is not since it continue its setup (i.e. unzipping chrome driver asynchronously). This is why it returns NULL as driver path. Can we make .setup() method wait everything done before method end?
I am unable to reproduce this issue. In fact, there are several tests in WebDriverManager using getDownloadedDriverPath()
, and all of them are working correctly (e.g., this one and others).
I tried the code you provided, but it seems incomplete (the imports are missing, and I think there are errors, like runtimeException
). If you provide a complete self-contained Java class that reproduces the issue, I can test it on my side.
We will try to provide problem demo, but that will be hard since it is flaky problem that appears in very specific circumstances. But sometimes - it affects up to 30% of tests ( https://github.com/jdi-testing/jdi-light/issues/2971 )
There is a PR https://github.com/bonigarcia/webdrivermanager/pull/895 which enables parallel test execution. They are always failed.
The last run:
Error: Errors: Error: CacheTest.testCache:68 » NoSuchElement No value present Error: ChromeCreateTest.setupTest:35 » WebDriverManager There was an error creating WebDriver object for Chrome Error: ChromeListCreateTest.setupTest:38 » WebDriverManager There was an error creating WebDriver object for Chrome Error: ChromeRemoteTest.setupClass:41 » Config java.lang.reflect.InvocationTargetException
@bonigarcia please have a look on Natasha's PR: https://github.com/bonigarcia/webdrivermanager/pull/895 that demonstrates the problem
Indeed, there are failed tests running the WebDriverManager tests in parallel. I just checked it once again, and the cause for failed tests in parallel is related to frozen browsers or irresponsive drivers. But I don't see any test that fails due to getDownloadedDriverPath()
, sorry.
Any update on this?
Description of the problem: calling wdm.getDownloadedDriverPath() after wdm.setup() may produce a 'null' as a result
Browser and version: Chrome 103
Operating system: macOS Monterey
WebDriverManager version: 5.3.0
WebDriverManager call:
WebDriverManager traces:
56:52.135 [io.github.bonigarcia.wdm.online.Downloader:INFO]: Extracting driver from compressed file chromedriver_linux64.zip 198 56:52.446 [io.github.bonigarcia.wdm.WebDriverManager:INFO]: Exporting webdriver.chrome.driver as /home/runner/.cache/selenium/chromedriver/linux64/103.0.5060.134/chromedriver 199 56:52.453 [JDI:INFO]: [23] Download driver: 'CHROME X64' successfully 200 56:52.454 [JDI:INFO]: [23] Download driver path : 'null' successfully