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

Function get_edge_versions

scripts/pinned_browsers.py:190–214  ·  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

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

Callers 1

Calls 4

getMethod · 0.65
requestMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected