Hi,

I'm a new user to Watir and am attempting to use it with RSpec and a Chrome 
browser:-

This is the error message I get when I run rspec 
spec/views/index.erb_spec.rb:

C:\git\GG.Infra.UserManager>rspec spec/views/index.erb_spec.rb
ffi-yajl/json_gem is deprecated, these monkeypatches will be dropped shortly

GGInfraUserManager
←[31m  initial page has username text box (FAILED - 1)←[0m

Failures:

  1) GGInfraUserManager initial page has username text box
     ←[31mFailure/Error:←[0m ←[31mbefore { goto "http://localhost:9090/"; 
}←[0m
     ←[31mNoMethodError←[0m:
       ←[31mundefined method `goto' for 
#<RSpec::Core::ExampleGroup::Nested_1:0x36bd5b8 @__memoized=nil>←[0m
←[36m     # ./spec/views/index.erb_spec.rb:9:in `block (2 levels) in <top 
(required)>'←[0m

Finished in 0.04203 seconds
←[31m1 example, 1 failure←[0m

and this is my index.erb_spec.rb

require 'spec_helper' 
require "watir"


browser = Watir::Browser.new :chrome

describe "GGInfraUserManager" do
before { goto "http://localhost:9090/"; }


it "initial page has username text box" do
text_field(:username => "bunny").should be_present

end 

end 

This is within the configure block in spec_helper.rb

RSpec.configure do |config|
config.before :all do @browser = Watir::Browser.new end config.after :all 
do @browser.close if @browser end 
...
end

Gems loaded:
watir (5.0.0 x86-mingw32) watir-classic (4.0.1) watir-rspec (1.1.2) 
watir-webdriver (0.6.11)
rspec (3.1.0, 2.99.0)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
rspec-mocks (3.1.3, 2.99.2)
rspec-support (3.1.2, 3.1.0)

I have also copied the chrome driver (for the chrome browser) to the Ruby 
path.

Can you tell me how I can fix this error?

Many thanks







-- 
-- 
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]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to