Chromedriver does not respond on Centos 7

Viewed 405

Hi in a headless centos 7 I am trying to getting work headless selenium tests. To do that I Installed google-chrome, chromedriver and selenium pip package but I have no success here is what I have done.

google-chrome version:

yum list installed |grep google-chrome
google-chrome-stable.x86_64             83.0.4103.106-1                @google-chrome

I downloaded chrome driver version 83.0.4103.39 from this link, unzip it and move it to the /usr/bin/local

-rwxr-xr-x   1 root root 10774816 May  5 23:53 chromedriver

and that path is in env as well.

PATH=...:/usr/local/bin/chromedriver:/usr/local/bin/

When I type chromdriver in the terminal nothing happens. It just stucks. I am behind corporate proxy so I can't really try to change firewall or etc. What am i doing wrong ?

1 Answers

Don't put binary executables on $PATH, but only directory /usr/local/bin.

You'll have to source the profile after editing it: . ~/.bashrc.

And you might have to configure it for headless mode:

options = webdriver.ChromeOptions()
options.add_argument('window-size=1920x1080');
options.add_argument('--headless')
options.add_argument('--incognito');

Also check for possible alerts there: sealert -a /var/log/audit/audit.log.

Related