Selenium WebDriver does not work


I cannot get webdriver working. No matter what I do, when I try to start it, I am getting:

require "selenium-webdriver"
driver = Selenium::WebDriver.for :chrome

Selenium::WebDriver::Error::UnknownError (unknown error: Chrome failed to start: exited abnormally.)
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/lib64/chromium-browser/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Then I need to kill the process. Any clue how to troubleshoot this? All JS webdriver tests do fail and are extremely slow.

Weird I googled this out and adding headless parameter works, I just do not know how to add this to Foreman configuration:

require "selenium-webdriver"
options =
driver = Selenium::WebDriver.for :chrome, options: options

Weird we do set those arguments in the codebase:

However running tests yields in errors, nothing related to selenium works. All tags are not found.

Question - when you run JS tests, do you see some arguments passed into chromedriver process? All I see is:

# ps axuwww | grep chrome
lzap     1791177  1.7  0.0 305872 22192 pts/6    Sl   15:49   0:00 /usr/bin/chromedriver --port=9515

I am wondering if arguments are actually passed in my case.

Hmmm subprocesses do have the arguments.

I tried it on my laptop and it works there. But the error was different - it wanted me to run webpack:compile which I did not perform for quite some time on my main machine. Uh if this was it then I lost almost a day troubleshooting selenium-webdriver while it was simply missing compiled assets :frowning:

That was indeed the case. Cool.