Sha256: 31e7a4c5b2f25ff713cc36aa6b7543afdeeb08d6460eae8ef4d66ca71ac7a515
Contents?: true
Size: 1.21 KB
Versions: 6
Compression:
Stored size: 1.21 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/features_spec_helper') describe 'Google Search' do include_context "AcceptanceTest" before :all do acceptance_test.app_host = "http://www.google.com" end before do puts "Using driver: #{Capybara.current_driver}." end it "uses selenium driver", driver: :selenium, exclude: false do visit('/') fill_in "q", :with => "Capybara" find("#gbqfbw button").click all(:xpath, "//li[@class='g']/h3/a").each { |a| puts a[:href] } end it "uses webkit driver", driver: :webkit do visit('/') fill_in "q", :with => "Capybara" has_selector? ".gsfs .gssb_g span.ds input.lsb", :visible => true # wait for ajax to be finished button = first(".gsfs .gssb_g span.ds input.lsb") button.click all(:xpath, "//li[@class='g']/h3/a").each { |a| puts a[:href] } end it "uses poltergeist driver", driver: :poltergeist do pending visit('/') fill_in "q", :with => "Capybara" has_selector? ".gsfs .gssb_g span.ds input.lsb", :visible => true # wait for ajax to be finished button = first(".gsfs .gssb_g span.ds input.lsb") button.click all(:xpath, "//li[@class='g']/h3/a").each { |a| puts a[:href] } end end
Version data entries
6 entries across 6 versions & 1 rubygems