Hi, Jason:
irb failed at the same step with the following error message:
irb(main):005:0> ie.text_field(:name, "q").set "pickaxe"
WIN32OLERuntimeError: unknown property or method `document'
HRESULT error code:0x800706ba
The RPC server is unavailable.
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-
class.rb:44
7:in `method_missing'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-
class.rb:44
7:in `document'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
container.rb:7
38:in `locate_input_element'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:5:in `locate'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:49:
in `assert_exists'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284
:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:
in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:323:in `set'
I'm running this test at home on Windows Vista (64-bit) but the
original bug was found also on Windows XP at work.
On Mar 18, 7:36 pm, "Jason Trebilcock" <[email protected]>
wrote:
> In addition to what Darin has recommended, you might want to see what
> happens when you run the below commands through irb. (Like Darin, I was
> able to complete the below.)
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
>
> On Behalf Of Darin Duphorn
> Sent: Wednesday, March 18, 2009 8:37 PM
> To: [email protected]
> Subject: [wtr-general] Re: Getting 'assert_exists': Unable to locate
> element, using :name, "q" (Watir::Exception::UnknownObject...
>
> Does it open the web page correctly? Or does it fail right off the bat?
>
> Check the following.
>
> Goto Setting ->Control Panel-> System
> Click Advanced Tab
> Click Environment Variables
> Under Path Variable verify c:\Ruby\bin Exists. If not add it.
> Under PATHEXT Variable verify .RB exists. If not add it
> If variable RUBYOPT Doesn't Exist add it
> RUBYOPT - Value = -rubygems
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of [email protected]
> Sent: Wednesday, March 18, 2009 8:26 PM
> To: Watir General
> Subject: [wtr-general] Re: Getting 'assert_exists': Unable to locate
> element, using :name, "q" (Watir::Exception::UnknownObject...
>
> Thank you, Darin for reply.
>
> Ruby version:
> ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
>
> Gem list:
> *** LOCAL GEMS ***
>
> activesupport (2.3.2)
> builder (2.1.2)
> commonwatir (1.6.2)
> firewatir (1.6.2)
> fxri (0.3.6)
> fxruby (1.6.12)
> hoe (1.11.0)
> hpricot (0.6)
> log4r (1.0.5)
> rake (0.8.4, 0.7.3)
> rubyforge (1.0.3)
> rubygems-update (1.3.1)
> s4t-utils (1.0.4)
> sources (0.0.1)
> user-choices (1.1.6)
> watir (1.6.2)
> win32-api (1.4.0, 1.0.4)
> win32-clipboard (0.4.3)
> win32-dir (0.3.2)
> win32-eventlog (0.4.6)
> win32-file (0.5.4)
> win32-file-stat (1.2.7)
> win32-process (0.6.0, 0.5.3)
> win32-sapi (0.1.4)
> win32-sound (0.4.1)
> windows-api (0.3.0, 0.2.0)
> windows-pr (1.0.2, 0.7.2)
> xml-simple (1.0.12)
>
> On Mar 18, 6:02 pm, "Darin Duphorn" <[email protected]>
> wrote:
> > I ran your code and it worked for me.
>
> > What Version of ruby did you load?
>
> > Type in command prompt
> > ruby -v
>
> > What gems do you have installed?
> > gem list
>
> > -----Original Message-----
> > From: [email protected]
>
> > [mailto:[email protected]] On Behalf Of
> > [email protected]
> > Sent: Wednesday, March 18, 2009 6:42 PM
> > To: Watir General
> > Subject: [wtr-general] Getting 'assert_exists': Unable to locate
> > element, using :name, "q" (Watir::Exception::UnknownObject...
>
> > I was trying to run google_search.rb from tutorial:
>
> > require 'watir'
>
> > # set a variable
> > test_site = "http://www.google.com"
>
> > # open the IE browser
> > ie = Watir::IE.new
>
> > ie.goto test_site
>
> > ie.text_field(:name, "q").set "pickaxe" # "q" is the name of the
> > search field
>
> > Always getting 'assert_exists': Unable to locate element, using :name,
> > "q" (Watir::Exception::UnknownObjectException...)
>
> > Spent already half a day. Nothing works. Please, help.
>
> > Thank you very much,
> > Vladimir- 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 [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
-~----------~----~----~----~------~----~------~--~---