Sha256: 78e8273c13437e0097d0b9918cc71af2b3bacf0410d60802096ab1d5902ecaca

Contents?: true

Size: 1.59 KB

Versions: 21

Compression:

Stored size: 1.59 KB

Contents

require 'acceptance_test'
require 'rspec/expectations'
require 'capybara/rspec'

RSpec::configure do |config|
  config.include Capybara::RSpecMatchers
end

# profile = Selenium::WebDriver::Chrome::Profile.new
# # profile['download.prompt_for_download'] = false
# profile['webdriver.chrome.driver'] = "c:\\work\\selenium-server\\chromedriver.exe"
#
# # properties[:profile] = profile
#
# properties = {}
# properties[:url] = "http://10.111.74.226:4444/wd/hub"
# properties[:browser] = :remote
# properties[:desired_capabilities] = Selenium::WebDriver::Remote::Capabilities.chrome(:profile => profile)
#
#
# # ENV['webdriver.chrome.driver'] = "c:\work\selenium-server\chromedriver.exe"
# #properties[:desired_capabilities]['webdriver.chrome.driver'] = "c:\work\selenium-server\chromedriver.exe"

AcceptanceTest.instance.configure({webapp_url: 'http://www.wikipedia.org', timeout_in_seconds: 10,
                                   driver: :selenium, browser: :chrome})

require 'spec_helper'
require 'pages/wikipedia_pages'

RSpec.describe 'Wikipedia Search' do
  include Capybara::DSL

  let(:pages) { WikipediaPages.new(self) }

  before do |example|
    AcceptanceTest.instance.setup page, example.metadata

    puts "Using driver: #{Capybara.current_driver}."
    puts "Default wait time: #{Capybara.default_wait_time}."
  end

  after do |example|
    AcceptanceTest.instance.teardown page, example.metadata
  end

  it "searches on wikipedia web site" do
    pages.execute do
      visit_home_page

      enter_word "Capybara"

      submit_request

      expect(page).to have_content "Hydrochoerus hydrochaeris"
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
acceptance_test-1.11.7 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.11.6 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.11.5 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.11.4 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.11.3 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.11.2 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.11.1 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.11.0 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.12 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.11 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.10 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.9 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.8 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.7 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.6 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.5 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.4 spec/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.3 spec/wikipedia/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.2 spec/wikipedia/acceptance/search_with_pages_spec.rb
acceptance_test-1.10.1 spec/wikipedia/acceptance/search_with_pages_spec.rb