You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using webdrivermanager 5.1.0 on Ubuntu 20.04 with chromedriver (for chromium) installed via snap having almost the same problem as described in #403.
The snap installation is simply not detected and a chromedriver gets downloaded, which - of course - cannot work with the snap installed chromium.
I debugged for several hours and found out the reason why:
WebDriverManager has a field named versionDetector. Which is read by WebDriverManager.getVersionDetector() but never assigned.
During processing of WebDriverManager.setup(), WebDriverManager.getVersionDetector() gets called at least two times - returning a new VersionDetector each.
The first VersionDetector used within WebDriverManager.getBrowserVersionFromTheShell() - in my case - detects the chromedriver to be a snap and sets its isSnap flag, but nobody cares about this.
Later on WebDriverManager.manage() calls WebDriverManager.getVersionDetector() a second time and receives a virgin VersionDetector which has no knowledge about the first ones findings.
The same pattern as with WebDriverManager.getVersionDetector() applies to the fields resolutionCache and webDriverCreator with their WebDriverManager.getResolutionCache() and WebDriverManager.getWebDriverCreator() methods - fields are read but never assigned, getters return new instances with each call.
I do not know the real intention of this implementation - additional with respect to the three fields have protected access - but for me the current beaviour seems to be unintentional.
I'll try to setup a pull request within the next days which fixes at least the behaviour of versionDetector and WebDriverManager.getVersionDetector().
The text was updated successfully, but these errors were encountered:
I'm using webdrivermanager 5.1.0 on Ubuntu 20.04 with chromedriver (for chromium) installed via snap having almost the same problem as described in #403.
The snap installation is simply not detected and a chromedriver gets downloaded, which - of course - cannot work with the snap installed chromium.
I debugged for several hours and found out the reason why:
WebDriverManager
has a field namedversionDetector
. Which is read byWebDriverManager.getVersionDetector()
but never assigned.WebDriverManager.setup()
,WebDriverManager.getVersionDetector()
gets called at least two times - returning a newVersionDetector
each.VersionDetector
used withinWebDriverManager.getBrowserVersionFromTheShell()
- in my case - detects the chromedriver to be a snap and sets itsisSnap
flag, but nobody cares about this.WebDriverManager.manage()
callsWebDriverManager.getVersionDetector()
a second time and receives a virginVersionDetector
which has no knowledge about the first ones findings.The same pattern as with
WebDriverManager.getVersionDetector()
applies to the fieldsresolutionCache
andwebDriverCreator
with theirWebDriverManager.getResolutionCache()
andWebDriverManager.getWebDriverCreator()
methods - fields are read but never assigned, getters return new instances with each call.I do not know the real intention of this implementation - additional with respect to the three fields have protected access - but for me the current beaviour seems to be unintentional.
I'll try to setup a pull request within the next days which fixes at least the behaviour of
versionDetector
andWebDriverManager.getVersionDetector()
.The text was updated successfully, but these errors were encountered: