Looks like you forgot to capitalize the module name in your include
statement.  "include watir" is incorrect, try "include Watir", or even
better remove the line altogether and use Watir::IE to get to the IE
class.

require 'rubygems'
require 'watir'

test_site = "http://www.google.com/";

ie = Watir::IE.new
ie.goto test_site

That's how I would do it.

On Jan 29, 5:21 am, malar <malar.je...@gmail.com> wrote:
> Hi,
> I successfully Installed  Ruby 186.26   and watir-1.6.2 & common watir
> 1.6.2.
> I set the proxy value too.
> But I am not able to run my program. My coding as follows
>
> require 'rubygems'
> require 'watir'
> include watir
>
> Test-site=http://www.google.com/
>
> ie=IE.new
> ie.goto Test-site
>
> …….
>
>   I am getting “undefined local variable or method `watir' for
> main:Object (NameError)” error when I run this code..
>
> If I remove “include watir” line from the code
>
> I get an error” uninitialized constant IE (NameError)”
>
> What’s the problem?
>
> Please help me…
>
>  Thanks in Advance,
> malar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to