Open wjxway opened 6 years ago
I wonder if we should have support for multiple webdrivers (versions) for all browsers? I feel like keeping all these drivers up to date over time is a fair amount of work.
I was wondering if it is possible to check the version of browser/OS first and directly download the corresponding webdriver automatically. Then we don't need to keep these driver at all in the release, we let the users download them when they load the package instead.
That might work ... But then you need to have knowledge of all the download locations for ChromeDriver, GeckoDriver, and EdgeDriver ...
I think this is the canonical place for the ChromeDriver binaries: https://chromedriver.storage.googleapis.com/index.html
And for the GeckoDriver binaries: https://github.com/mozilla/geckodriver/releases
And EdgeDriver binaries: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
This code would get all the EdgeDriver binaries:
In[8]:= links =
Import["https://developer.microsoft.com/en-us/microsoft-edge/tools/\
webdriver/", "Hyperlinks"];
Select[links, StringEndsQ[#, "MicrosoftWebDriver.exe"] &]
Out[9]= {"https://download.microsoft.com/download/D/4/1/D417998A-58EE-\
4EFE-A7CC-39EF9E020768/MicrosoftWebDriver.exe", \
"https://download.microsoft.com/download/1/4/1/14156DA0-D40F-460A-\
B14D-1B264CA081A5/MicrosoftWebDriver.exe", \
"https://download.microsoft.com/download/3/4/2/342316D7-EBE0-4F10-\
ABA2-AE8E0CDF36DD/MicrosoftWebDriver.exe", \
"https://download.microsoft.com/download/3/2/D/32D3E464-F2EF-490F-\
841B-05D53C848D15/MicrosoftWebDriver.exe"}
Yup, I download my driver from these sites as well, but another hard problem is to know about OS version and Browser version and how to determine the corresponding version of driver......
Maybe InstallWebTools
should offer an option to point to a specific webdriver binary on the web. Not perfect, but it would let a user override the default one (which should be the latest one):
InstallWebTools[... , "WebDriverLocation" -> url ]
Yup, that make sense!
Edge Driver only works under corresponding Windows build. If the build number and Edge Driver's version is not exactly the same, driver would crash. Is it possible to create a function to check driver vapidity and download corresponding driver?