Giter Site home page Giter Site logo

irfanahmadein / headless_browser_tests Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 23 KB

Get started with headless chrome/firefox within 5 minutes

Home Page: https://irfanahmad.in/Headless-Chrome/

Ruby 96.03% Gherkin 3.97%
headless-chrome headless-testing selenium testing capybara cucumber headless-firefox headless-screenshots

headless_browser_tests's Introduction

headless browser tests

lets sit and try headless browsers for chrome and firefox in 10 minutes

Build Status

SetUp

  1. Installing Browser in your system

A.On mac

  • Install chrome 59+
  • Install firefox 56+

B.On Ubuntu server

  • Install firefox
$ sudo apt-get update
$ wget https://ftp.mozilla.org/pub/firefox/releases/56.0/linux-x86_64/en-US/firefox-56.0.tar.bz2
$ tar -xjf firefox-56.0.tar.bz2
$ sudo mv firefox /opt/firefox56
$ sudo ln -s /opt/firefox56/firefox-bin /usr/bin/firefox
  • Install chrome
$ export CHROME_BIN=/usr/bin/google-chrome
$ sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
$ sudo apt-get install google-chrome-stable
  1. 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
  1. Install bundler
$gem install bundler

clone the repo and run bundle install ,all dependencies will be added

$bundle install

4)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

headless_browser_tests's People

Contributors

irfanahmadein avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

upgrad

headless_browser_tests's Issues

Setup section error

There is an error on setup section where talks about browser version that repeats the chrome for both items

1. You must have chrome 59+ installed in your system.
2. You must have chrome 56+ installed in your system.

Should It not be like

1. You must have chrome 59+ installed in your system.
2. You must have firefox 56+ installed in your system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.