Get the latest EdgeDriver version for a given major version and platform.
(major, platform)
| 215 | |
| 216 | |
| 217 | def get_edgedriver_version(major, platform): |
| 218 | """Get the latest EdgeDriver version for a given major version and platform.""" |
| 219 | platform_suffix = "LINUX" if platform == "linux" else "MACOS" |
| 220 | r = http.request( |
| 221 | "GET", |
| 222 | f"https://msedgedriver.microsoft.com/LATEST_RELEASE_{major}_{platform_suffix}", |
| 223 | ) |
| 224 | if r.status != 200: |
| 225 | return None |
| 226 | return r.data.decode("utf-16").strip() |
| 227 | |
| 228 | |
| 229 | def get_edgedriver_url(version, platform): |
no test coverage detected