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

Function edge_and_edgedriver

scripts/pinned_browsers.py:335–368  ·  view source on GitHub ↗

Fetch Edge browser and EdgeDriver, ensuring versions are compatible.

()

Source from the content-addressed store, hash-verified

333
334
335def edge_and_edgedriver():
336 """Fetch Edge browser and EdgeDriver, ensuring versions are compatible."""
337 matches = {}
338
339 for platform in ["mac", "linux"]:
340 print(f"Finding matching Edge version for {platform}...", file=sys.stderr)
341 match = find_matching_edge_version(platform)
342 if match:
343 matches[platform] = match
344 else:
345 print(
346 f"Warning: No matching Edge browser/driver found for {platform}",
347 file=sys.stderr,
348 )
349
350 content = ""
351
352 # Output browsers first: mac, then linux
353 if "mac" in matches:
354 browser = matches["mac"]["browser"]
355 content += mac_edge_browser_content(browser["url"], browser["hash"], browser["version"])
356
357 if "linux" in matches:
358 browser = matches["linux"]["browser"]
359 content += linux_edge_browser_content(browser["url"], browser["hash"])
360
361 # Output drivers: linux, then mac
362 if "linux" in matches:
363 content += edgedriver_content("linux_edgedriver", matches["linux"]["driver_url"])
364
365 if "mac" in matches:
366 content += edgedriver_content("mac_edgedriver", matches["mac"]["driver_url"])
367
368 return content
369
370
371def edgedriver_content(name, driver_url):

Callers 1

pinned_browsers.pyFile · 0.85

Calls 4

mac_edge_browser_contentFunction · 0.85
edgedriver_contentFunction · 0.85

Tested by

no test coverage detected