Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Chrome 74. Global Config via code. README is out of date. #313

Closed
evanliferock opened this issue Mar 13, 2019 · 26 comments
Closed

Chrome 74. Global Config via code. README is out of date. #313

evanliferock opened this issue Mar 13, 2019 · 26 comments

Comments

@evanliferock
Copy link

Chrome 74 is a thing now. The webdrivermanger downloads chrome 74 but tries to run chrome 73 causing failure.

I was using version 3.0.0 and using WebDriverManager.config() to globally set the target path for all drivers to put the binaries in. However in the newer versions it doesn't seem to work. I would rather not set a target path for each browser individually so I looked for how to set global config but found this in the README:

Moreover, as of WebDriverManager 2.2.x, configuration value can be customized using a configuration manager. This manager can be accessed using WebDriverManager.config(). For example:

which doesn't work. How can I globally setTargetPath for all drivers.

@agdula
Copy link

agdula commented Mar 13, 2019

@evanliferock try running using this system property: -Dwdm.chromeDriverVersion=73

@bonigarcia
Copy link
Owner

@evanliferock Thanks for reporting.

Indeed the README is outdated. As of WDM 3.2.0 WebDriverManager.config() is not available because it might cause problems between managers. As of this version, configuration is done per manager (e.g. WebDriverManager.chromedriver().config()).

I have just committed a patch to allow global configuration from code using a new method: WebDriverManager.globalConfig(). It will be available for next version.

@nomerson
Copy link

nomerson commented Mar 13, 2019

and what about chromedriver 74? why does manager download beta driver instead of stable by default?

Latest stable release: ChromeDriver 73.0.3683.68
Latest beta release: ChromeDriver 74.0.3729.6

@nerjamartin
Copy link

nerjamartin commented Mar 13, 2019

Another workaround is to rename the folder for ChromeDriver 74 to use ChromeDriver 73 instead... In the while we're waiting for chrome 74
It's a little trick, but it works :-)

@sanp0001
Copy link

Another workaround is to rename the folder for ChromeDriver 74 to use ChromeDriver 73 instead... In the while we're waiting for chrome 74
It's a little trick, but it works :-)

Where do you find this Chrome folder ?

@sanp0001
Copy link

and what about chromedriver 74? why does manager download beta driver instead of stable by default?

Latest stable release: ChromeDriver 73.0.3683.68
Latest beta release: ChromeDriver 74.0.3729.6

Yes, this is first thing I saw in the morning today.

This version of ChromeDriver only supports Chrome version 74
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)

@bonigarcia
Copy link
Owner

To avoid this kind of problems, the latest version of WebDriverManager (3.3.0 at the time of this writing) is highly recommended.

@nerjamartin
Copy link

Another workaround is to rename the folder for ChromeDriver 74 to use ChromeDriver 73 instead... In the while we're waiting for chrome 74
It's a little trick, but it works :-)

Where do you find this Chrome folder ?

If you are under Windows you should find it here :
C:\Users\<your_user>\.m2\repository\webdriver\chromedriver\

@sanp0001
Copy link

To avoid this kind of problems, the latest version of WebDriverManager (3.3.0 at the time of this writing) is highly recommended.

Sry, my bad. Updated the version to 3.3.0 and it perfectly works.

@bonigarcia thanks for quick reply and this amazing DriverManager.

@sanp0001
Copy link

sanp0001 commented Mar 13, 2019

@nomerson add latest version in maven dependency - 3.3.0.

"
io.github.bonigarcia
webdrivermanager
3.3.0
"

It works as smooth as butter.

@nerjamartin
Copy link

nerjamartin commented Mar 13, 2019

If you use Selenide :

https://twitter.com/jselenide/status/1105734134633127938

@evanliferock
Copy link
Author

Wow a lot more comments thank I expected haha

The workaround I was using for the meantime for Chrome 74 is

WebDriverManager.chromedriver().version("73");

Easy enough. I assumed the 3.3.0 would fix the Chrome 74 issue. Just wanted to make sure you aware if it didn't and needed to fix anything since 74 was released recently (yesterday right?).

I will stick with chrome 73 until the newest version with the global config is out! Thanks for the fast response and adding the globalConfig!

@sanp0001
Copy link

Guys, I have a question. How to automatically set in dependency so that it always gets the latest version from repo? So that I don't have to update the version every time new version releases.

@nomerson
Copy link

nomerson commented Mar 14, 2019

@sanp0001, try this:
<dependency> <groupId>io.github.bonigarcia</groupId> <artifactId>webdrivermanager</artifactId> <version>LATEST</version> </dependency>

https://stackoverflow.com/questions/30571/how-do-i-tell-maven-to-use-the-latest-version-of-a-dependency

@sanp0001
Copy link

sanp0001 commented Mar 14, 2019

One more, I'm running tests on CI. Linux machine has picked up my project and is throwing this error.

image

This is what I have for driver

ChromeOptions chromeOptions = new ChromeOptions();
                    chromeOptions.addArguments("--headless");
                    chromeOptions.addArguments("--disable-gpu");
                    chromeOptions.addArguments("disable-notifications");
                    chromeOptions.addArguments("allow-running-insecure-content");
                    WebDriverManager.chromedriver().setup();
                    driver = new ChromeDriver(chromeOptions);

@sanp0001
Copy link

@sanp0001, try this:
<dependency> <groupId>io.github.bonigarcia</groupId> <artifactId>webdrivermanager</artifactId> <version>LATEST</version> </dependency>

https://stackoverflow.com/questions/30571/how-do-i-tell-maven-to-use-the-latest-version-of-a-dependency

@nomerson , LATEST and RELEASE have been taken out from Maven 3.0 onwards. It doesn't work.

@purplekiz17
Copy link

Another workaround is to rename the folder for ChromeDriver 74 to use ChromeDriver 73 instead... In the while we're waiting for chrome 74
It's a little trick, but it works :-)

where is this folder situated ?

@nerjamartin
Copy link

Another workaround is to rename the folder for ChromeDriver 74 to use ChromeDriver 73 instead... In the while we're waiting for chrome 74
It's a little trick, but it works :-)

where is this folder situated ?

GoTo : #313 (comment)

:-)

@hpinglia
Copy link

I reverted back to Chrome Version 73.0.3683.75 but WebDriverManager (version 3.0.0) keeps downloading chromedriver version 74.0.3729.6. (This version of ChromeDriver only supports Chrome version 74)

@evanliferock
Copy link
Author

evanliferock commented Mar 14, 2019

This issue is closed. Follow this comment #318 (comment)
or do

WebDriverManager.chromedriver().version("73");

or upgrade to version 3.3.0.

Or follow the other suggestions in this thread

@utkarsh1996
Copy link

To avoid this kind of problems, the latest version of WebDriverManager (3.3.0 at the time of this writing) is highly recommended.

works for me!!! Thanks

@ghost
Copy link

ghost commented Mar 25, 2019

This seems to be a Linux thread and I know the issue is closed, but I am seeing the same issue on the Windows version: webdriver-manager v13.0.0 All the folders are different so I can't employ the workaround listed here. Please provide a windows based workaround. Will the underlying defect be fixed? i.e., the mismatch with Chrome version? If this is the wrong place, where would I post this for a solution? Cheers - RW

@evanliferock
Copy link
Author

#313 (comment)

@ghost
Copy link

ghost commented Mar 25, 2019

@evanliferock I can't see your comment. It is only visible on hover and just where you recommended some solution it is cut off.

@evanliferock
Copy link
Author

It's in this thread, about 5 comments up. #313 (comment)

@ghost
Copy link

ghost commented Mar 25, 2019

@evanliferock Thx, I see it, in what file/folder do you put that line of code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants