Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a link to get the latest Microsoft Edge version number?

I'm looking for a link to get the latest driver version number for Microsoft Edge similar to Google Chrome's link: https://chromedriver.storage.googleapis.com/LATEST_RELEASE

I have a function to return a string of the version number. Then, I can create a download link like so:

private String getLatestChromeDriverVersion(){
        RestTemplate restTemplate = new RestTemplate();
        String url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE";
        return restTemplate.getForObject(url, String.class);
    }

String chromeDownloadUrl = "https://chromedriver.storage.googleapis.com/" + getLatestChromeDriverVersion() + "/chromedriver_win32.zip";

I've been searching around for something similar for Edge, but I can't find anything. They have this page for downloading the driver: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ but nothing like /latest or /stable.

Any ideas?

like image 881
Ryan Fulton Avatar asked Oct 26 '25 07:10

Ryan Fulton


1 Answers

You can get the latest version number that has been given in the official documentation via these two links:

https://msedgedriver.azureedge.net/LATEST_STABLE

and

https://msedgewebdriverstorage.blob.core.windows.net/edgewebdriver/LATEST_STABLE

Note: They all return a file instead of directly returning a version number like chrome, you need to get the version number from this file.

A simple demo:

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
   .uri(URI.create("https://msedgedriver.azureedge.net/LATEST_STABLE"))
   .build();
        
HttpResponse<String> response  = client.send(request, BodyHandlers.ofString());
        
String version = response.body().replaceAll("[^\\d|.]", "");
System.out.println(version);
like image 94
Xudong Peng Avatar answered Oct 28 '25 20:10

Xudong Peng



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!