sh 在Ubuntu 16.04上安装ChromeDriver和Selenium
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 在Ubuntu 16.04上安装ChromeDriver和Selenium相关的知识,希望对你有一定的参考价值。
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Remove existing downloads and binaries so we can start from scratch.
rm ~/google-chrome-stable_current_amd64.deb
rm ~/chromedriver_linux64.zip
sudo rm /usr/local/bin/chromedriver
sudo rm /usr/local/share/chromedriver
# Install dependencies.
sudo apt-get update
sudo apt upgrade
sudo apt install python3-pip libgconf-2-4 libnss3-dev htop unzip
# Install Chrome.
wget -N https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -P ~/
sudo dpkg -i --force-depends ~/google-chrome-stable_current_amd64.deb
sudo apt-get -f install -y
sudo dpkg -i --force-depends ~/google-chrome-stable_current_amd64.deb
# Install ChromeDriver.
wget -N https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/share/
sudo chmod +x /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
以上是关于sh 在Ubuntu 16.04上安装ChromeDriver和Selenium的主要内容,如果未能解决你的问题,请参考以下文章
sh 在ubuntu 16.04上安装saltstack
sh 在ubuntu 16.04上安装saltstack
sh 在Ubuntu 16.04上安装Mongo 3.6
sh 在Ubuntu 16.04上安装Mongo 3.4
sh 在Ubuntu 16.04上安装Pulse Secure
sh 在Ubuntu 16.04上安装ChromeDriver和Selenium