Try using a combination of clickElement 
<http://webtest.canoo.com/webtest/manual/clickElement.html> and storeXPath 
<http://webtest.canoo.com/webtest/manual/storeXPath.html>.

I haven't tried this, but I think it should work:

<clickElement description="Click Row 1, Column 0 in the table"
   xpath="//td[contains(@class, &quot;x-grid-cell-1-0&quot;)]" />
<storeXPath description="Grab the ID in Row 1, Column 0"
    xpath="//td[contains(@class, &quot;x-grid-cell-1-0&quot;)]"
    property="clickedID" />
<clickButton description="Click the Select Site Button"
   label="Select Site" />
<storeXPath description="Grab the ID in Data Struct"
    xpath="//tr[td=&quot;DATA&quot;]/td[2]"
    property="returnedID" />
<verifyProperty description="Verify the clicked ID and the returned ID are the 
same"
   property="returnedID"
    value="#{clickedID}" />

John Spann | Associate Software Engineer

Citrix Online Division
Citrix Systems, Inc.
6500 Hollister Avenue
Goleta, CA 93117 USA
www.citrix.com

Phone: 805.690.3489
Cell: 805.729.0008
Email: [email protected]


________________________________
From: Francesco Barilla <[email protected]>
Reply-To: <[email protected]>, Francesco Barilla <[email protected]>
Date: Thu, 30 Apr 2009 21:11:45 -0700
To: <[email protected]>
Subject: [Webtest] Selecting a row in a grid

Hello Everyone,


Does anyone know how to select a row in a grid using Canoo Webtest.

I have provided an example of the type of grid I am trying to work on at 
http://ronnenburg.com/index.cfm

For example: I need to be able to select Id 2 in the grid, click the button 
("Select Site") and then retrieve that Id (2) after submitting the page.

Any help would be appreciated. Cheers.





_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to