Danp2 / au3WebDriver

Web Driver UDF for AutoIt
MIT License
107 stars 21 forks source link

ChromeDriver download location is changing #473

Closed Danp2 closed 1 year ago

Danp2 commented 1 year ago

Bug report

Describe the bug

From here --

The download location for ChromeDriver releases will change.

This applies to both the old ChromeDriver Stable + Beta downloads at https://chromedriver.storage.googleapis.com/ as well as the old Canary downloads at https://chromedriver.chromium.org/chromedriver-canary. We won’t publish new downloads to these locations in the future.

Consult the Chrome for Testing availability dashboard to learn about the new URL format. Use @puppeteer/browsers to easily download and launch browser + driver binaries, or build your own custom solution using our JSON API endpoints.

How to reproduce

N/A

Expected behavior

_WD_UpdateDriver will continue to work correctly with future releases of ChromeDriver

To Do

Danp2 commented 1 year ago

The new JSON API endpoints are nice, but using them may require reworking the existing implementation since you can no longer obtain the latest release for a single milestone. For example, here's the resulting JSON from https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone-with-downloads.json --

CLICK ME

```json { "timestamp": "2023-05-17T14:08:11.783Z", "milestones": { "113": { "milestone": "113", "version": "113.0.5672.63", "revision": "1121455", "downloads": { "chrome": [ { "platform": "linux64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.63/linux64/chrome-linux64.zip" }, { "platform": "mac-arm64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.63/mac-arm64/chrome-mac-arm64.zip" }, { "platform": "mac-x64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.63/mac-x64/chrome-mac-x64.zip" }, { "platform": "win32", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.63/win32/chrome-win32.zip" }, { "platform": "win64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.63/win64/chrome-win64.zip" } ] } }, "114": { "milestone": "114", "version": "114.0.5735.26", "revision": "1135570", "downloads": { "chrome": [ { "platform": "linux64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/114.0.5735.26/linux64/chrome-linux64.zip" }, { "platform": "mac-arm64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/114.0.5735.26/mac-arm64/chrome-mac-arm64.zip" }, { "platform": "mac-x64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/114.0.5735.26/mac-x64/chrome-mac-x64.zip" }, { "platform": "win32", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/114.0.5735.26/win32/chrome-win32.zip" }, { "platform": "win64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/114.0.5735.26/win64/chrome-win64.zip" } ] } }, "115": { "milestone": "115", "version": "115.0.5776.0", "revision": "1144913", "downloads": { "chrome": [ { "platform": "linux64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/linux64/chrome-linux64.zip" }, { "platform": "mac-arm64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/mac-arm64/chrome-mac-arm64.zip" }, { "platform": "mac-x64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/mac-x64/chrome-mac-x64.zip" }, { "platform": "win32", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/win32/chrome-win32.zip" }, { "platform": "win64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/win64/chrome-win64.zip" } ], "chromedriver": [ { "platform": "linux64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/linux64/chromedriver-linux64.zip" }, { "platform": "mac-arm64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/mac-arm64/chromedriver-mac-arm64.zip" }, { "platform": "mac-x64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/mac-x64/chromedriver-mac-x64.zip" }, { "platform": "win32", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/win32/chromedriver-win32.zip" }, { "platform": "win64", "url": "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5776.0/win64/chromedriver-win64.zip" } ] } } } } ```

To use the existing functionality, the Regex would need to know which milestone (113, 114, or 115) is being targeted.

mlipok commented 1 year ago

as an answer to: https://github.com/Danp2/au3WebDriver/pull/477#issuecomment-1574890073 I think we should copy old settings:

["chrome", "chrome.exe", "chromedriver.exe", False, "goog:chromeOptions", "'https://chromedriver.storage.googleapis.com/LATEST_RELEASE_' & StringLeft($sBrowserVersion, StringInStr($sBrowserVersion, '.') - 1)", "", '"https://chromedriver.storage.googleapis.com/" & $sDriverLatest & "/chromedriver_win32.zip"'],

for example:

["chromeold", "chrome.exe", "chromedriver.exe", False, "goog:chromeOptions", "'https://chromedriver.storage.googleapis.com/LATEST_RELEASE_' & StringLeft($sBrowserVersion, StringInStr($sBrowserVersion, '.') - 1)", "", '"https://chromedriver.storage.googleapis.com/" & $sDriverLatest & "/chromedriver_win32.zip"'],

just simply chrome >> chromeold

EDIT: for reference: similar case was raisen here: https://www.autoitscript.com/forum/topic/208640-webdriver-udf-help-support-iv/?do=findComment&comment=1519048

Danp2 commented 1 year ago

@mlipok See https://github.com/Danp2/au3WebDriver/pull/477/commits/392947d934e333813c6389a3b04acb1cb74c1cd1

mlipok commented 1 year ago

Looks fine.