Hi Amit,

When driving Firefox you need to use watir-webdriver not watir.

These are the two line I changed.
require 'watir-webdriver'
browser = Watir::Browser.default = "firefox"



On Fri, Feb 1, 2013 at 8:52 AM, Amit Kumar <[email protected]> wrote:
> Dear All:
>
> Hope you all are doing great. Please help on following error.
>
> I am getting error while executing script. I am using Windows 8 and Ruby187.
>
> Code:
> require 'rubygems'
> require 'Watir'
> Watir::Browser.default = "firefox"
> browser = Watir::Browser.start "website url"
> browser.form(:id, "signin").text_field(:id, "username").set("username")
> browser.form(:id, "signin").text_field(:id, "password").set("password")
> browser.form(:id, "signin").button(:value, "Sign In").click
>
> Error:
> E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require': no such file to load -- watir/loader (LoadError)
>     from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
>     from E:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-4.0.0/lib/Watir.rb:1
>     from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in
> `gem_original_require'
>     from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in
> `require'
>     from hello.rb:2
>
> --
> Thanks and Regards,
> Amit
>
> --
> --
> 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/groups/opt_out.
>
>

-- 
-- 
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/groups/opt_out.


Reply via email to