1

I have Linux on remote machine. I tried to start set of selenium test via ssh but it is failed all the time

from selenium import webdriver
chromedriver = "/somepath/webdriver/chromedriver"
browser = webdriver.Chrome(chromedriver)

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.28.455506 (18f6627e265f442aeecasdasdasdadsad819aeeea1f),platform=Linux 4.4.34-1.el7.elrepo.x86_64 x86_64)

then I tried start it with Xvfb and pyvirtualdisplay

from pyvirtualdisplay import Display
from selenium import webdriver
display = Display(visible=0, size=(800, 600))
display.start()
chromedriver = "/somepath/webdriver/chromedriver"
browser = webdriver.Chrome(chromedriver)

but then I got error selenium.common.exceptions.WebDriverException: Message: chrome not reachable How can I start Chrome via ssh on Linux with Python Selenium?

nick_gabpe
  • 5,113
  • 5
  • 29
  • 38
  • Possible duplicate: http://stackoverflow.com/questions/9210765/any-way-to-start-google-chrome-in-headless-mode – Alexander Ejbekov Apr 03 '17 at 12:35
  • or for this, http://stackoverflow.com/questions/29204780/selenium-common-exceptions-webdriverexception-message-uchrome-not-reachable – Nishant Srivastava Apr 03 '17 at 12:37
  • This is definitely not a duplicate. In first case we start chrome without selenium and python. In second case we use different one library and use Chrome Options. – nick_gabpe Apr 03 '17 at 15:47
  • maybe you should do: export DISPLAY=: in bash script eg. export DISPLAY=:101 – Adam Apr 03 '17 at 16:55
  • Possible duplicate of [Any way to start Google Chrome in headless mode?](https://stackoverflow.com/questions/9210765/any-way-to-start-google-chrome-in-headless-mode) – GhostCat Jul 20 '18 at 13:04

0 Answers0