[Webtest] Numberformat Exception when using property with table row

Saba Sundke webtest@lists.canoo.com
Thu, 21 Aug 2003 20:11:45 +0530


Thanx Mittie

This will surely address my problem. I just wanted to make sure I was not
using it incorrectly. I hope that this feature is being considered though.
It will be nice to have.

- Saba


-----Original Message-----
From: webtest-admin@gate.canoo.com
[mailto:webtest-admin@gate.canoo.com]On Behalf Of Dierk Koenig
Sent: Thursday, August 21, 2003 7:57 PM
To: webtest@gate.canoo.com
Subject: RE: [Webtest] Numberformat Exception when using property with
table row


Hi Saba,

the nested table locator does not support the use of dynamic properties.

I suggest to use verifyxpath instead. Example:

<repeat count="2" countername="row" >
 	<verifyxpath stepid="Check if MidWest is region in row #{row}"

xpath="//table[@id='searchresults']//tr[#{row}]/td[1][contains(string(),'Mid
West']" />
</repeat>

If I understand your test correctly, you try to assert that there is
no row in this table that has a region other than "MidWest".
My ususal way of dealing with this is trying to find a row that breaks
my condidion and putting this in a not step:

<not stepid="assert MidWest is region in all results">
     <verifyxpath stepid="region other than MidWest"

xpath="//table[@id='searchresults']//td[1][not(contains(string(),'MidWest')]
" />
</not>

This works regardless of how many rows you have.

cheers
Mittie


> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Saba Sundke
> Sent: Donnerstag, 21. August 2003 15:44
> To: webtest@gate.canoo.com
> Subject: [Webtest] Numberformat Exception when using property with table
> row
>
>
> I'm using the following code to test if text 'MidWest' is present
> in all the
> rows of the table
> <repeat count="2" countername="row">
> 	<verifytext stepid="Check if MidWest is region in all results"
> 		text="MidWest">
> 		<table id="searchresults" row="#{row}" column="1"/>
> 	</verifytext>
> </repeat>
> It give me a java.lang.NumberFormatException:For input string: "#{row}".
> What am i doing wrong?
> - Saba
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>


_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest