Sha256: 412047908feb22041087d6e4b538d890dfe24e9bed1c3f2938a9d5484f648781

Contents?: true

Size: 973 Bytes

Versions: 94

Compression:

Stored size: 973 Bytes

Contents

# Full Watir API: http://wtr.rubyforge.org/rdoc/
# Full RSpec API: http://rspec.rubyforge.org/

Given 'I am on the Google search page' do
  @browser.goto 'http://www.google.com/'
end

When /I search for "(.*)"/ do |query|
  @browser.text_field(:name, 'q').set(query)
  @browser.button(:name, 'btnG').click
end

Then /I should see/ do |text|
  @browser.text.should =~ /#{text}/m
end

# To avoid step definitions that are tightly coupled to your user interface,
# consider creating classes for your pages - such as this:
# http://github.com/cucumber/cucumber/tree/v0.1.15/examples/watir/features/step_definitons/search_steps.rb
#
# You may keep the page classes along your steps, or even better, put them in separate files, e.g.
# support/pages/google_search.rb
#
# This technique is called "Page Objects", and you can read more about it here:
# http://github.com/marekj/watirloo/tree/master
# We're not using this technique here, since we want to illustrate the basics only.

Version data entries

94 entries across 90 versions & 11 rubygems

Version Path
cucumber-2.99.0 examples/watir/features/step_definitions/search_steps.rb
mobiusloop-0.1.5 examples/watir/features/step_definitions/search_steps.rb
cucumber-3.0.0.pre.1 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.4.0 examples/watir/features/step_definitions/search_steps.rb
mobiusloop-0.1.3 examples/watir/features/step_definitions/search_steps.rb
mobiusloop-0.1.2 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.3.3 examples/watir/features/step_definitions/search_steps.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/cucumber-1.3.18/examples/watir/features/step_definitions/search_steps.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/cucumber-1.3.18/examples/watir/features/step_definitions/search_steps.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/cucumber-1.3.16/examples/watir/features/step_definitions/search_steps.rb
cucumber-2.3.2 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.3.1 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.3.0 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.2.0 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.1.0 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.0.2 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.0.1 examples/watir/features/step_definitions/search_steps.rb
cucumber-1.3.20 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.0.0 examples/watir/features/step_definitions/search_steps.rb
cucumber-2.0.0.rc.5 examples/watir/features/step_definitions/search_steps.rb