In a previous email, you indicate that you're running Watir 1.4.1.  But, the
below indicates that you're on 1.6.2.

In any case, I tried running your code and it worked fine. (What happens if
you switch the require 'watir' and require 'rubygems' lines? Could that be
the source of your problem? Further, do you have the variable RUBYOPT set in
your environment variables with the value of 'rubygems'?)

That is:
require 'watir'
require 'rubygems'
#require "win32ole"


ie = Watir::IE.new
ie.goto("http://google.com";)

ie.text_field(:name, "q").set("watir")
ie.button(:name, "btnG").click

On Tue, Nov 10, 2009 at 8:42 AM, tester86 <sagar.am...@gmail.com> wrote:

>
> Here is the list of my local gems (just incase its helps)
>
> *** LOCAL GEMS ***
>
> actionmailer (2.3.4)
> actionpack (2.3.4)
> activerecord (2.3.4)
> activeresource (2.3.4)
> activesupport (2.3.4)
> builder (2.1.2)
> camping (1.5.180)
> commonwatir (1.6.2)
> cucumber (0.4.3)
> diff-lcs (1.1.2)
> firewatir (1.6.2)
> fxri (0.3.7, 0.3.6)
> fxruby (1.6.19, 1.6.12)
> hoe (2.3.3)
> hoe-seattlerb (1.2.1)
> hpricot (0.8.2, 0.6)
> json_pure (1.1.9)
> log4r (1.1.2, 1.0.5)
> markaby (0.5)
> metaid (1.0)
> minitest (1.4.2)
> polyglot (0.2.9)
> rack (1.0.1)
> rails (2.3.4)
> rake (0.8.7, 0.7.3)
> rspec (1.2.9)
> rubyforge (2.0.3)
> rubygems-update (1.3.5)
> s4t-utils (1.0.4)
> session (2.4.0)
> sources (0.0.1)
> term-ansicolor (1.0.4)
> test-spec (0.10.0)
> treetop (1.4.2)
> user-choices (1.1.6)
> watir (1.6.2)
> win32-api (1.4.5, 1.0.4)
> win32-clipboard (0.5.2, 0.4.3)
> win32-dir (0.3.5, 0.3.2)
> win32-eventlog (0.5.2, 0.4.6)
> win32-file (0.6.3, 0.5.4)
> win32-file-stat (1.3.4, 1.2.7)
> win32-process (0.6.1, 0.5.3)
> win32-sapi (0.1.5, 0.1.4)
> win32-sound (0.4.2, 0.4.1)
> win32console (1.2.0)
> win32ole-pp (1.2.0)
> windows-api (0.4.0, 0.2.0)
> windows-pr (1.0.8, 0.7.2)
> xml-simple (1.0.12)
>
> Is there any gem that I am missing that is causing the error?
>
> On Nov 10, 8:10 am, tester86 <sagar.am...@gmail.com> wrote:
> > I removed include Watir now my script is:
> >
> > require 'watir'
> > require 'rubygems'
> > #require "win32ole"
> >
> > ie = Watir::IE.new
> > ie.goto("http://google.com";)
> >
> > ie.text_field(:name, "q").set("watir")
> > ie.button(:name, "btnG").click
> >
> > I still get the same error message. I am using watir 1.4.1. Below is
> > my ruby version
> >
> > C:\ruby>ruby --version
> > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> >
> > I have done gem update prevsiously, gem system updates but nothing
> > works. Any ideas on what I can do to get a basic script up and running
> > using watir?
> >
> > On Nov 9, 10:52 pm, Raveendran P <jazzezr...@gmail.com> wrote:
> >
> >
> >
> > > Hi,
> >
> > > Add first line --> require 'rubygems'
> > > Remove line no.2 --> include Watir
> >
> > > I hope it works now. If its not working then Please provide more
> details
> > > about Watir Verison and Ruby version.
> >
> > > Thanks
> >
> > > On Tue, Nov 10, 2009 at 3:19 AM, tester86 <sagar.am...@gmail.com>
> wrote:
> >
> > > > I am trying to run a watir script:
> >
> > > > require 'watir'
> > > > include Watir
> >
> > > > ie = Watir::IE.new
> > > > ie.goto("http://google.com";)
> >
> > > > ie.text_field(:name, "q").set("watir")
> > > > ie.button(:name, "btnG").submit
> >
> > > > when I run it from command line ruby filename.rb I get the following
> > > > error message:
> >
> > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
> > > > unknown proper
> > > > ty or method `document' (WIN32OLERuntimeError)
> > > >    HRESULT error code:0x800706ba
> > > >      The RPC server is unavailable.    from c:/ruby/lib/ruby/
> > > > site_ruby/1.8/watir.rb:1336:in `document'
> > > >        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
> > > > `getContainerContents'
> > > >        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
> > > > `getObject'
> > > >        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
> > > > `initialize'
> > > >        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
> > > >        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
> > > > `text_field'
> > > >        from script1.rb:6
> >
> > > > Any Ideas.....?
> >
> > > --
> > > Regards,
> > > P.Raveendranhttp://raveendran.wordpress.com-Hide quoted text -
> >
> > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
> >
>

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