Created
July 30, 2019 13:05
-
-
Save artsok/f11727a4d2bcb5cbbc0a89e5a99565ca to your computer and use it in GitHub Desktop.
Download necessary drivers for chrome and IE browsers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -e "For what browser download drivers?\\n 1.chrome\n 2.IE" | |
read -e browser | |
echo "You chose $browser" | |
case $browser in | |
1|chrome) | |
#Only win32 | |
chromeUrl="http://chromedriver.storage.googleapis.com/" | |
distrub="chromedriver_win32.zip" | |
declare -a arr=("2.46" "2.45" "2.44" "2.43" "2.42" "2.41" "2.40" "2.39" "2.38" "2.37" "2.36" "2.35" "2.34" "2.33" "73.0.3683.68" "74.0.3729.6" "75.0.3770.8" "75.0.3770.90" "75.0.3770.140" "76.0.3809.12" "76.0.3809.25" "76.0.3809.68") | |
for version in "${arr[@]}" | |
do | |
echo "$chromeUrl$version/$distrub" | |
curl "$chromeUrl$version/$distrub" -o chromedriver_win32_"$version".zip | |
done | |
;; | |
2|IE) | |
ieUrl="https://selenium-release.storage.googleapis.com/" | |
declare -a arr=("2.53/IEDriverServer_Win32_2.53.1.zip" "3.1/IEDriverServer_Win32_3.1.0.zip" "3.10/IEDriverServer_Win32_3.10.0.zip" "3.11/IEDriverServer_Win32_3.11.1.zip" "3.12/IEDriverServer_Win32_3.12.0.zip" "3.141/IEDriverServer_Win32_3.141.59.zip") | |
for version in "${arr[@]}" | |
do | |
echo "url=$ieUrl$version" | |
filename=$(echo $version | cut -d'/' -f2-) | |
curl "$ieUrl$version" -o "$filename" | |
done | |
;; | |
*) | |
echo "Nothing to do" | |
;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment