Skip to content

Commit

Permalink
fix chrome version not found
Browse files Browse the repository at this point in the history
Raises with a useful message when the Chrome version is not found
  • Loading branch information
apmechev committed Sep 30, 2023
1 parent 178a390 commit 27f49f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webdriver_manager/drivers/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def get_latest_release_version(self):
url = "https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build.json"
response = self._http_client.get(url)
response_dict = json.loads(response.text)
if determined_browser_version not in response_dict.get("builds"):
raise Exception(f"No build version {determined_browser_version} found in inventory at {url}")
determined_browser_version = response_dict.get("builds").get(determined_browser_version).get("version")
return determined_browser_version
# Remove the build version (the last segment) from determined_browser_version for version < 113
Expand Down

0 comments on commit 27f49f5

Please sign in to comment.