How do I check if a URL will download a file using Selenium in Python? How do I check if a URL will download a file using Selenium in Python? selenium selenium

How do I check if a URL will download a file using Selenium in Python?


first you can get url then in java with selenium you can below condition in if:

(String)((JavascriptExecutor) driver).executeScript("return document.contentType;").equals("text/html");