Installation and use of the installation of Linux selenium selenium + chrome in linux

Selenium + chrome mounted in linux

 

Referring mainly to some elements of Baidu, plus their actual operations, several of their problems are summarized:

The first question: Installing selenium --- sudo pip install selenium

显示:You are using pip version 8.1.1, however version 18.0 is available.

pip's version is too low

solution:

Update pip

Run the code: sudo pip install -upgrade pip

 

The second question: installation chrome--

The first step: sudo apt-get install libxss1 libappindicator1 libindicator7

Step two: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

The third step: sudo qpt-get install -f

第四步:sudo dpkg -i google-chrome-stable_current_amd64.deb


The third question: Installing chromedriver ---

The first step: wget -N http://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip

Step two: unzip chromedriver_linux64.zip

The third step: chmod + x chromedriver

Step four: sudo mv -f chromedriver / usr / local / share / chromedriver

第五步: sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver

Step Six: sudo ln -s / usr / local / share / chromedriver / usr / bin / chromedrive

When knocking the code must be careful, any mistake will lead to the letters of the last error.

Referring mainly to some elements of Baidu, plus their actual operations, several of their problems are summarized:

The first question: Installing selenium --- sudo pip install selenium

显示:You are using pip version 8.1.1, however version 18.0 is available.

pip's version is too low

solution:

Update pip

Run the code: sudo pip install -upgrade pip

 

The second question: installation chrome--

The first step: sudo apt-get install libxss1 libappindicator1 libindicator7

Step two: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

The third step: sudo qpt-get install -f

第四步:sudo dpkg -i google-chrome-stable_current_amd64.deb


The third question: Installing chromedriver ---

The first step: wget -N http://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip

Step two: unzip chromedriver_linux64.zip

The third step: chmod + x chromedriver

Step four: sudo mv -f chromedriver / usr / local / share / chromedriver

第五步: sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver

Step Six: sudo ln -s / usr / local / share / chromedriver / usr / bin / chromedrive

When knocking the code must be careful, any mistake will lead to the letters of the last error.

Guess you like

Origin www.cnblogs.com/ppp1314520818/p/11300088.html