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

Webdriver can't be downloaded for new chrome ver. 115 and higher. #14

Closed
dbelykh opened this issue Jul 19, 2023 · 7 comments
Closed

Webdriver can't be downloaded for new chrome ver. 115 and higher. #14

dbelykh opened this issue Jul 19, 2023 · 7 comments

Comments

@dbelykh
Copy link

dbelykh commented Jul 19, 2023

The following exception is raised when launching tests:
"OneTimeSetUp: System.Net.Http.HttpRequestException : Response status code does not indicate success: 404 (Not Found)."
The AutoSetUpDriverToUse() is called on the OneTimeSetUp step.

The most possible reason is that starting from version 115 Google changed the URLs for webdriver downloading:
https://chromedriver.chromium.org/downloads
https://googlechromelabs.github.io/chrome-for-testing/

  1. New base url is https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.98/linux64/chrome-linux64.zip
    But Atata.WebDriverSetup tries to get appropriate driver version using old url: https://chromedriver.storage.googleapis.com
  2. the URL parameters are also a bit changed.
  3. it seems that it is not possible to just get latest release or get webdriver if you don't know the exact driver version.
@YevgeniyShunevych
Copy link
Member

Thank you @dbelykh for reporting that. I will be taking a look at this issue.

As a temporarily hot fix (before the fix in the library), instead of AtataContext.GlobalConfiguration.AutoSetUpDriverToUse() or similar setup code, you can use v114 for now:

DriverSetup.ConfigureChrome()
    .WithVersion("114.0.5735.90")
    .SetUp();

@dbelykh
Copy link
Author

dbelykh commented Jul 19, 2023

@YevgeniyShunevych Thank you very much for the advise!)
I also have discovered an alternative workaround:
Put the correct webdriver manually to a directory /drivers/chrome/{version} and modify versioncache.xml

<versions>
  <version browser="{actual browser version}" driver="{actual driver version}" timestamp="{some recent time, eg. 2023-07-19 13:10:21Z}" />
<version browser="latest" driver="{actual driver version}"" timestamp="{some recent time, eg. 2023-07-19 14:10:21Z}"/>
</versions>

Not sure if the last row is required. But maybe it will work even after minor browser update.

@YevgeniyShunevych
Copy link
Member

I have just released Atata.WebDriverSetup v2.7.0 with added support of Chrome v115+ via Chrome for Testing API endpoints. Please update the version and check it out.

@dbelykh
Copy link
Author

dbelykh commented Jul 20, 2023

Thank you for the prompt response. I have updated to 2.7.0. But nothing is changed. Same exception. And folder bin/drivers/chrome is empty.
Windows 10. Visual studio 2022.

@YevgeniyShunevych
Copy link
Member

Strange. I updated on couple of projects and it was OK. May it be because you modified versioncache.xml or something else? You can try to completely remove drivers folder.

@dbelykh
Copy link
Author

dbelykh commented Jul 20, 2023

Yes, I have removed this drivers folder firstly.
I have setup driver code in a separate Nuget package. I have updated it there but haven't updated in the main project.
After updating it there too, the issue is not reproduced anymore.
Thank you a lot for the prompt response and fix :-)

@YevgeniyShunevych
Copy link
Member

Great. Thanks again for raising this issue.

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

No branches or pull requests

2 participants