A tutorial on how to use RSpec with Selenium for web automated testing.
Dependencies :
- Ruby v2.5.1
- Selenium-Webdriver (Ruby gem)
- RSpec (Ruby gem)
- ChromeDriver
Clone the repository
git clone https://github.com/MickStick/RSpec-With-Selenium-Tutorial
Download and Install Ruby.
Install Bundler
$ cd path/to/project
$ gem install bundler
Install All Gems
$ cd path/to/project
$ bundle install
Download Google Chrome's ChromeDriver
Create a "drivers" folder inside of the root project folder
Unzip and move the chromedriver to the drivers folder
.env
ChromeDriver="path/to/chromedriver"
Runing the test is actually very simple and is one line of code in the terminal.
$ cd path/to/project
$ rspec path/to/test
Eg.
$ rspec spec/page/page_spec.rb