Sha256: 98dc30fec9f561ee7d8259d567ea782aca4f94c8810d568a523e450cf3ffe4d8
Contents?: true
Size: 1.35 KB
Versions: 18
Compression:
Stored size: 1.35 KB
Contents
require 'rspec/expectations' require 'acceptance_test' AcceptanceTest.instance.configure({webapp_url: 'http://www.wikipedia.org', timeout_in_seconds: 10}) AcceptanceTest.instance.driver_manager.register_driver(:selenium, :chrome) AcceptanceTest.instance.driver_manager.register_driver(:webkit) AcceptanceTest.instance.driver_manager.register_driver(:poltergeist) RSpec.describe 'Wikipedia Search' do include Capybara::DSL before do AcceptanceTest.instance.setup AcceptanceTest.instance.driver_manager.use_driver(:selenium_chrome) puts "Using driver: #{Capybara.current_driver}." puts "Default wait time: #{Capybara.default_wait_time}." end after do AcceptanceTest.instance.teardown end it "uses selenium driver" do visit('/') fill_in "searchInput", :with => "Capybara" find(".formBtn", match: :first).click expect(page).to have_content "Hydrochoerus hydrochaeris" end it "uses webkit driver", driver: :webkit do visit('/') fill_in "searchInput", :with => "Capybara" find(".formBtn", match: :first).click expect(page).to have_content "Hydrochoerus hydrochaeris" end it "uses poltergeist driver", driver: :poltergeist do visit('/') fill_in "searchInput", :with => "Capybara" find(".formBtn", match: :first).click expect(page).to have_content "Hydrochoerus hydrochaeris" end end
Version data entries
18 entries across 18 versions & 1 rubygems