MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / get_edge_versions

Function get_edge_versions

scripts/pinned_browsers.py:185–209  ·  view source on GitHub ↗

Fetch all available Edge browser versions for a platform from enterprise API.

(platform)

Source from the content-addressed store, hash-verified

183
184
185def get_edge_versions(platform):
186 """Fetch all available Edge browser versions for a platform from enterprise API."""
187 r = http.request("GET", "https://edgeupdates.microsoft.com/api/products?view=enterprise")
188 all_data = case_insensitive_json_loads(r.data)
189
190 platform_name = "MacOS" if platform == "mac" else "Linux"
191 artifact_name = "pkg" if platform == "mac" else "deb"
192
193 versions = []
194 for data in all_data:
195 if data.get("product") != "Stable":
196 continue
197 for release in data["releases"]:
198 if release.get("platform") != platform_name:
199 continue
200 for artifact in release["artifacts"]:
201 if artifact["artifactname"] == artifact_name:
202 versions.append(
203 {
204 "url": artifact["location"],
205 "hash": artifact["hash"],
206 "version": release["productversion"],
207 }
208 )
209 return versions
210
211
212def get_edgedriver_version(major, platform):

Callers 1

Calls 4

getMethod · 0.65
requestMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected