headless browser tests
lets sit and try headless browsers for chrome and firefox in 10 minutes
SetUp
- You must have chrome 59+ installed in your system.
- You must have chrome 56+ installed in your system.
- Install ruby 2.3.0 or above with rvm RVM is ruby version manager. We can install it
$curl -sSL https://get.rvm.io | bash -s stable --ruby
$rvm install 2.3.0
$rvm use 2.3.0 --default
On ubuntu
$sudo apt-get install ruby
- Install bundler
$gem install bundler
clone the repo and run bundle install ,all dependencies will be added
$bundle install
5)Install geckodriver
$wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.19.0-linux64.tar.gz
$tar -xvzf geckodriver*
$chmod +x geckodriver
$sudo mv geckodriver /usr/local/bin/
Run Test
To run tests on headless chrome
$bundle exec cucumber DRIVER=headless_chrome
To run tests on headless firefox
$bundle exec cucumber DRIVER=headless_firefox
To run tests on headless firefox with verbose logging
$bundle exec cucumber DRIVER=headless_firefox DEBUG=true