在Ubuntu上安装Chrome Driver和Firefox Driver

Posted 白色单车

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Ubuntu上安装Chrome Driver和Firefox Driver相关的知识,希望对你有一定的参考价值。

首先下载Chrome Driver(Firefox Driver的安装与该步骤相同)

链接:

http://chromedriver.storage.googleapis.com/index.html

接下来在控制台(terminal)上操作一下红色字体的指令:

  • Install Unzip

sudo apt-get install unzip

  • Assuming you’re running a 64-bit OS, download the latest version of chromedriver from their website

wget -N http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip -P ~/Downloads

unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads

  • Make the file you downloaded executable, and move it to /usr/local/share

chmod +x ~/Downloads/chromedriver

sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver

  • Also, create symlinks to the chromedriver. Cucumber would look for the drivers in /usr/bin/chromedriver

sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver

sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver

以上是关于在Ubuntu上安装Chrome Driver和Firefox Driver的主要内容,如果未能解决你的问题,请参考以下文章

install chrome and chrome driver on ubuntu

如何在Ubuntu 20.04上安装Google Chrome浏览器

如何在ubuntu上安装virtualbox的driver module vboxdrv

sh 在Ubuntu 16.04上安装Chrome,ChromeDriver和Selenium

sh 在Ubuntu 16.04上安装Chrome,ChromeDriver和Selenium

Ubuntu上安装Chrome浏览器