Re: [wtr-general] Problem with attribute_value() -- Zeljko?

2010-02-10 Thread Wesley Chen
The code below can work in my editor.
puts $ie.text_field(:xpath, "//inp...@qa='request-form.first_name']/")
puts $ie.form(:index, 1).attribute_value("qa")
*
*
*I have the same Watir, ruby version, windows version as you.*
*I think you may try the code again.*
*
*
Wesley.
For life, the easier, the better.


On Thu, Feb 11, 2010 at 6:28 AM, AR  wrote:

> @ie.text_field(:xpath, "//inp...@qa='request.first_name']/")
>

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


[wtr-general] Problem with attribute_value() -- Zeljko?

2010-02-10 Thread AR
One of our developers has been trying to make clearer hooks for my
WATIR development efforts.  We're testing a theory using custom tags
to see if I can access elements, and after following the advice here
and on Zeljko's blog, I'm running into an interesting issue.

These examples are not in an exact or necessarily logical order - I
only have a few minutes to type this up.

Example page code:



To access these elements, I have had success with the following to
verify that it exists and Watir can access the element normally
@ie.form(:index, 1)
@ie.text_field(:title, /First/)

However, when I try attribute_value and xpath, I'm getting Nil as the
result, or a UFO error.
@ie.form(:index, 1).attribute_value("qa")
@ie.text_field(:xpath, "//inp...@qa='request.first_name']/")

Am I using this incorrectly?

Thanks!

Watir 1.6.5
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

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