0

I've selenium script which launches chrome browser, goes to a website and does basic checks.

When I tried running same script locally through jenkins I got error

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.13.0-17-generic x86_64)

This is resolved by Unknown error: Chrome failed to start: exited abnormally

I'm confused why Jenkins can't launch real chrome browser on Ubuntu ?

vikramvi
  • 3,312
  • 10
  • 45
  • 68

1 Answers1

2

Because Jenkins server normally does not have a graphical subsystem installed in the operating system. When a real browser (or any app) tries to create a window that fails.

You will need to run your tests on Jenkins using a headless browser - one that does not need a graphical subsystem. Chrome-headless is currently the preferred option, replacing the now abandoned PhantomJS.

SiKing
  • 10,003
  • 10
  • 39
  • 90
  • can you please have a look at one one jenkins related query https://stackoverflow.com/questions/47671536/jenkins-job-throwing-error-importerror-no-module-named-selenium-even-though – vikramvi Dec 11 '17 at 07:47