Is watir-rspec meant to work with watir or watir-webdriver?
I am currently using watir and rspec.
I am trying to setup watir-rspec so I can use the html-formatter and take screenshots and embed them in my html log file.
I have read the readme on github and it states to "add these lines to your spec_helper.rb file"
I am just unsure of where and which spec_helper.rb file it is referring to.
the code it states to add is below:
RSpec.configure do |config|
# Add Watir::RSpec::HtmlFormatter to get links to the screenshots, html and
# all other files created during the failing examples.
config.add_formatter('documentation')
config.add_formatter(Watir::RSpec::HtmlFormatter)
# Open up the browser for each example.
config.before :all do
@browser = Watir::Browser.new
end
# Close that browser after each example.
config.after :all do
@browser.close if @browser
end
# Include RSpec::Helper into each of your example group for making it possible to
# write in your examples instead of:
# @browser.goto "localhost"
# @browser.text_field(:name => "first_name").set "Bob"
#
# like this:
# goto "localhost"
# text_field(:name => "first_name").set "Bob"
#
# This needs that you've used @browser as an instance variable name in
# before :all block.
config.include Watir::RSpec::Helper
end