1

I'm trying to run this in Python on Manjaro Linux.

I've written some functional tests which we'd like to see running on our screens in our office. However, the tests only work if I pass a --headless option, which we absolutely do not want. Otherwise, the constant error we get is The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.. So this error is instantly gone when I pass along the --headless argument, which is very frustrating at this point. This is the code I'm trying with now:

 options = Options()
 options.add_argument("--no-sandbox")
 options.add_argument("--window-size=1920,1080")
 options.add_argument("--disable-gpu")
 options.add_argument("--disable-extensions")
 options.add_argument("--start-maximized")
 # options.add_argument("--headless")
 driver = webdriver.Chrome("/usr/bin/chromedriver", chrome_options=options)

Any tips are highly appreciated! Thanks!

Frodon
  • 3,684
  • 1
  • 16
  • 33
Istvan
  • 11
  • 2

1 Answers1

0

This is probably because your chrome is not installed on the default location. A detailed explanation is given here. You can specify the location that chrome is running from with the following option:

# chrome binary location specified here
options.binary_location = "/opt/google/chrome/google-chrome"
Cloudkollektiv
  • 11,852
  • 3
  • 44
  • 71
  • It says: which: no google-chrome in (/home/bpd/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin:/home/bpd/usr/local/share) – Istvan Feb 18 '20 at 10:33