I started out trying to learn how to write automated tests for a small project but nothing was working right out of the box. After a couple hours of searching & experimenting I found the right configuration for my project & figured sharing it might help folks in the future.
Here's a small summary of the errors I encountered on this debugging journey:
- Using Jasmine & WDIO,
send_keys
was crashing- It was a Firefox/geckodriver bug, or something like that
- WDIO appeared to hang after switching from Firefox to Chrome
- Chrome needed to be run in
--no-sandbox
mode, essentially
- Chrome needed to be run in
I figured my problem was probably stemming from having WDIO execute my tests on my local machine while Selenium was hammering on the browser in a Vagrant VM. So this will mainly be applicable for people using separate environments (vagrant->local, vagrant->vagrant, docker->local, etc) for WDIO & Selenium/Chromedriver. Here is a gist of the configuration file I ended up with.