Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Steps to Install and run headless chrome browser on centos 6.5 using chrome driver

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.

I am using java selenium.

Thanks in advance

like image 607
vish Avatar asked Sep 08 '17 06:09

vish


People also ask

How do I use Chrome driver in headless mode?

Mastering XPath and CSS Selector for Selenium Post version 59, Chrome supports headless execution. ChromeOptions class is utilized to modify the default characteristics of the browser. The addArguments method of the ChromeOptions class is used for headless execution and headless is passed as a parameter to that method.


2 Answers

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

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

These are the steps to follow:

  • 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!

  • Download Chromebrowser

    $ 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)
    
like image 168
vish Avatar answered Oct 22 '22 01:10

vish


This is the guide to install Google Chrome on CentOS 6. Big thanks to the guys at Intoli.com!

It also works for Amazon Linux and Red Hat Enterprise Linux.

https://intoli.com/blog/installing-google-chrome-on-centos/

like image 35
Wojtek Avatar answered Oct 22 '22 03:10

Wojtek