使用chrome驱动程序在centos 6.5上安装和运行无头chrome浏览器的步骤

使用chrome驱动程序在centos 6.5上安装和运行无头chrome浏览器的步骤

问题描述:

我需要在centos 6.5上安装chrome浏览器,在这里我需要自动化一些Web gui.我已经安装了chrome驱动程序.谁能提供chrome-61的步骤和下载链接以及如何安装.我的操作系统没有任何Gui.请提供命令.

I need to install chrome browser on centos 6.5, Here i need to automate some web gui. I have installed chrome driver. Can anyone please provide the steps and download link of chrome-61 and how to install it. My operating system does not have any Gui. Kindly provide the commands.

我正在使用Java硒.

I am using java selenium.

预先感谢

遗憾的是,谷歌浏览器不再支持6.x.您需要CentOS 7.x.

Sadly, Google Chrome no longer supports 6.x. You need CentOS 7.x.

我使用了Cent-OS 7.4.*,并且运行良好.

I used Cent-OS 7.4.* and it worked fine.

这些是要遵循的步骤:

  • 下载chromedriver :登录Linux计算机并执行以下命令:

  • Download chromedriver: login to Linux machine and execute these commands:

$ wget https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip
$ unzip chromedriver_linux64.zip
$ chromedriver --version
ChromeDriver 2.40.565383

确保始终安装最新版本!

Make sure you're always installing the latest version!

  • 下载Chrome浏览器

$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
$ sudo yum install google-chrome-stable_current_x86_64.rpm

$ google-chrome --version
Google Chrome 67.0.3396.87

$ yum install Xvfb

$ ps -ef | grep Xvfb
username 12988     1  0 Oct05 ?        00:00:02 Xvfb :99 -screen 0 1152x900x8

$ yum install maven
$ mvn -version
Apache Maven 3.0.5 (Red Hat 3.0.5-17)