I'm trying out cucumber. When I execute my tests, I get this error 
  Scenario:
  # features\google_search.feature:5
    Google Search for delicious relaunch failure
    Given I'm on the Google Search Home Page
  # features/step_definitions/google_search.rb:8
      undefined method `goto' for nil:NilClass (NoMethodError)
      ./features/step_definitions/google_search.rb:9:in `/^I'm on the Google 
Sea
rch Home Page$/'
      features\google_search.feature:7:in `Given I'm on the Google Search 
Home P
age'

My step definitions file looks like this:
 
require 'watir-webdriver'
require 'rspec'

@browser = Watir::Browser.new :ie


Given /^I'm on the Google Search Home Page$/ do
  @browser.goto "http://www.google.com";
end

When /^i search for delicious relaunch failure$/ do
  @browser.text_field(:name, "q").set("delicious relaunch failure")
  @browser.button(:name, "btnG").click
end

Then /^I should see "AVOS' Delicious Disaster: Lessons from a Complete 
Failure"$/ do |arg1|
  @browser.text.include("AVOS' Delicious Disaster: Lessons from a Complete 
Failure")
end

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to