[Wtr-general] Access all elements in a form
Sayali Patil
sayali.shail at gmail.com
Fri Apr 6 05:13:04 EDT 2007
Hi Zeljko,
Here is the html that is generated,
<form action="/servlet/acedispatcher" method="get">
<input type="Radio" checked name="parId0" value="0" onClick="submit()">
one two
<form action="/servlet/acedispatcher" method="get">
<input type="Radio" name="parId1" value="0" onClick="submit()"> aa
<input type="Radio" name="parId1" value="1" onClick="submit()"> bb
<input type="Radio" name="parId1" value="2" onClick="submit()"> cc
</form>
<input type="Radio" name="parId0" value="1" onClick="submit()"> two three
<form action="/servlet/acedispatcher" method="get">
<input type="Radio" name="parId1" value="0" onClick="submit()"> aa
<input type="Radio" name="parId1" value="1" onClick="submit()"> bb
<input type="Radio" name="parId1" value="2" onClick="submit()"> cc
</form>
<input type="Radio" name="parId0" value="2" onClick="submit()"> two three
</form>
In this case the parId0 parameter name is repeated twice in the same code.
Once it is displayed as individual radio buttons and once it is displayed in
the form of nested,
so when i select the parId0 from the individual parId0 the same radio button
gets selected
in the nested one .
The Watir code i m using is
$ie.radio(:name,"parId0",0).set
assert($ie.form(:index ,6).radio(:name , "parId0",0).isSet?)
$ie.radio(:name,"parId0",1).set
assert($ie.form(:index ,6).radio(:name , "parId0",1).isSet?)
the error i m getting when i run this code is
1) Error:
test_cxipvar(TC_CxIpVar):
Watir::Exception::UnknownObjectException: Unable to locate object, using
name and parId0
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:2416:in
`assert_exists'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:4149:in
`isSet?'
Please go through the above and let me know how can i code in watir the
right way
for this.
Thanks,
Sayali
On 4/6/07, Željko Filipin <zeljko.filipin at gmail.com> wrote:
>
> Hi Sayali,
>
> Can you post html of that form, your watir code, and error message?
>
> Zeljko
> --
> ZeljkoFilipin.com
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070406/e6b404e4/attachment.html
More information about the Wtr-general
mailing list