Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
FireWatir bug using exists? on a form element with xpath
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kevin White  
View profile  
 More options Mar 5 2009, 3:48 pm
From: Kevin White <ilium...@gmail.com>
Date: Thu, 5 Mar 2009 12:48:56 -0800 (PST)
Local: Thurs, Mar 5 2009 3:48 pm
Subject: FireWatir bug using exists? on a form element with xpath
Here is a piece of code that doesn't work in FireWatir 1.6.2:

require 'watir'

Watir::Browser.default = 'firefox'
browser = Watir::Browser.new

browser.goto("http://www.google.com")

searchform = browser.form(:xpath, "//form[@name='f']")

puts "Searchform is #{searchform.to_s}"

You will get this output:

>ruby firewatirbug.rb

C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1403:in `method_missing': stack level too deep
(SystemStackError)
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
htmlelements.rb:75:in `locate'
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1012:in `exists?'
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:965:in `assert_exists'
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1403:in `method_missing'
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
htmlelements.rb:75:in `locate'
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1012:in `exists?'
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:965:in `assert_exists'
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1403:in `method_missing'
         ... 9453 levels...
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1012:in `exists?'
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:965:in `assert_exists'
        from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1097:in `to_s'
        from firewatirbug.rb:10

Now, I found something on the net that says that this bug was fixed
way back in 2007:

http://code.google.com/p/firewatir/issues/detail?id=36

So is it fixed, did it recur, is my installation broken, ???

I've coded around it using element.attribute_value() but I really
wanted to use the xpath instead.

--Kevin White


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin White  
View profile  
 More options Mar 5 2009, 4:44 pm
From: Kevin White <ilium...@gmail.com>
Date: Thu, 5 Mar 2009 13:44:20 -0800 (PST)
Local: Thurs, Mar 5 2009 4:44 pm
Subject: Re: FireWatir bug using exists? on a form element with xpath
Apologies, that code just demonstrates that xpath isn't working right.
I was trying to use .exists? in my code, but the example just is to
demonstrate that the xpath doesn't work at all. If you try to
do .exists? on a form element using xpath, it fails the same way.

--Kevin

On Mar 5, 3:48 pm, Kevin White <ilium...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Angrez Singh  
View profile  
 More options Mar 6 2009, 12:36 am
From: Angrez Singh <ang...@gmail.com>
Date: Fri, 6 Mar 2009 11:06:09 +0530
Local: Fri, Mar 6 2009 12:36 am
Subject: Re: [wtr-general] Re: FireWatir bug using exists? on a form element with xpath

Nice catch, there was a spelling mistake while locating the form using
xpath. Fixed it. Will let you know when I check in the code

- Angrez


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »