[Webtest] Decrement in fieldIndex

Dierk Koenig webtest@lists.canoo.com
Tue, 18 Oct 2005 10:43:59 +0200


ok, we're getting closer :-)

try

       <storeXPath
                  xpath="count(//td[input/@type='checkbox'])-1"
                  property="checkBox_count" /> 
  	<setCheckbox
  		name="selected"
  		fieldIndex="#{checkBox_count}"
  		checked="false" />

i.e. do the calculation in the xpath

cheers
Mittie

> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Vikenty Menshutkin
> Sent: Dienstag, 18. Oktober 2005 9:23
> To: webtest@lists.canoo.com
> Subject: RE: [Webtest] Decrement in fieldIndex
> 
> 
> > have you tried this:
> > 
> >       <storeXPath
> >                  xpath="count(//td[input/@type='checkbox'])"
> >                  property="checkBox_count" /> 
> >  	<setCheckbox
> >  		name="selected"
> >  		fieldIndex="#{checkBox_count}"
> >  		checked="false" />
> > ?
> I use this in <repeat count="#{checkBox_count}">
> This failed with message "Can't set field with index '78', valid range is
> 0..77" that's why I`m trying to use scriptStep (exactly I need to 
> decrement
> #{checkBox_count} in fieldIndex)
> 
> > If yes, and it fails, what happens if you try:
> > 
> >  	<setCheckbox
> >  		name="selected"
> >  		fieldIndex="77"
> >  		checked="false" />
> > ?
> This works ok, but I don't need this.
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest