天天看點

linux配置chrome和chromedriver

開始我報錯是這樣的:

selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions

linux配置chrome和chromedriver

chromedriver我是下載下傳好直接通過winscp上傳上去的

注意腳本内的路徑要寫好chromedriver的路徑

這是chromedriver下載下傳的對照表下載下傳網址:

http://npm.taobao.org/mirrors/chromedriver/      

下載下傳chrome

sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb 
sudo apt-get install -f
      

注意點:在哪個路徑下載下傳就到哪個路徑解壓,不然就報錯

檢查版本:

google-chrome --version
      
linux配置chrome和chromedriver

測試腳本:

linux配置chrome和chromedriver

完美成功

come here ,Let’s study !沖!!!

繼續閱讀