Hi,
Please specify what changes should be done to use Rspec Framework

require 'rubygems'
require 'watir'
require 'spec'
require 'watir/container'
include Watir::Container
$email="www.gmail.com"
$username="username"
$password="password"
describe 'Navigating to Gmail Login Screen' do
    before :all do
    $ie = Watir::IE.new
    $ie.goto($email)
  end
describe 'Entering Credentials' do
      it 'Enter username name '
          $ie.text_field(:id, 'Email').set($username)
          $ie.text_field(:id, 'Passwd').set($password)
        it 'Clicking SignIN button'
          $ie.button(:name, 'signIn').click
      end
describe 'NAvigate to Result page and verify' do
      it 'verify for results'
    end
after(:each) do
end
end




Output:

C:\Ruby\Abhi_My Ruby>spec abhiRspec.rb --format specdoc
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/container.rb:
275:in `text_f
ield': uninitialized constant Watir::Container::TextField (NameError)
        from ./abhiRspec.rb:22
        from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/
example/example
_group_methods.rb:183:in `module_eval'
        from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/
example/example
_group_methods.rb:183:in `subclass'
        from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/
example/example
_group_methods.rb:55:in `describe'
        from ./abhiRspec.rb:20
        from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/
example/example
_group_methods.rb:183:in `module_eval'
        from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/
example/example
_group_methods.rb:183:in `subclass'
        from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/
example/example
_group_methods.rb:55:in `describe'
         ... 8 levels...
        from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/
runner/command_
line.rb:9:in `run'
        from C:/Ruby/lib/ruby/gems/1.8/gems/rspec-1.2.9/bin/spec:5
        from C:/Ruby/bin/spec:19:in `load'
        from C:/Ruby/bin/spec:19
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to