[Webtest] How to parse table data and click based on a matching table value.
Robert Bodziony
Robert Bodziony" <robert.bodziony@gmail.com
Sat, 5 Jan 2008 01:37:32 +0100
------=_Part_31470_17463198.1199493452390
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
hi
i think you need to look at
http://webtest.canoo.com/webtest/manual/repeat.html
regards,
Rbert
2008/1/4, q a <qalab17@gmail.com>:
>
> Hi,
>
> I am wondering if it is possible to do the following from a webtest
> testcase:
>
> I have a webpage containing a table with 2 columns, 1st column contains a
> filename, 2nd column contains a link.
> I would like to create a webtest that searches the 1st column, checks the
> filename against the current date, and if it matches, to click on the link.
> (The number of rows is variable, the number of columns is constant)
>
> For example:
>
> <table border=
> "1">
> <thead><tr><th class=
> "tableHeader">Filename</th><th class="tableHeader"
> >Status</th></tr></thead>
> <tbody id=
> "swdlform:apptab:_idJsp71:tbody_element"
> <tr><td>20080102.tar.gz</td><
> td><a href="#" onclick="return oamSubmitForm('20080102');"
> id="idJsp71:18">Click</a></td></tr
> >
> <tr><td>20080103.tar.gz</td><td><
> a href="#" onclick="return oamSubmitForm('20080103');"
> id="idJsp71:19">Click</a></td></tr
> >
> .
> .
> .
>
> </tbody>
> </table>
>
> Is this possible?
> If it is, an example would be greatly appreciated - I am brand new to
> webtest.
>
> Thanks for the help
>
>
>
------=_Part_31470_17463198.1199493452390
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
hi <br> i think you need to look at <a href="http://webtest.canoo.com/webtest/manual/repeat.html">http://webtest.canoo.com/webtest/manual/repeat.html</a><br> regards,<br> Rbert<br><br><div><span class="gmail_quote">2008/1/4, q a <
<a href="mailto:qalab17@gmail.com">qalab17@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi, <br><br>I am wondering if it is possible to do the following from a webtest testcase:
<br><br>I have a webpage containing a table with 2 columns, 1st column contains a filename, 2nd column contains a link.<br>I would like to create a webtest that searches the 1st column, checks the filename against the current date, and if it matches, to click on the link.
<br>(The number of rows is variable, the number of columns is constant) <br><br>For example:<br><pre><<span>table</span><span> border</span>=<span>
"1"</span>><br><<span>thead</span>><<span>tr</span>><<span>th</span><span> class</span>=<span>
"tableHeader"</span>>Filename</<span>th</span>><<span>th</span><span> class</span>=<span>"tableHeader"</span>
>Status</<span>th</span>></<span>tr</span>></<span>thead</span>><br><<span>tbody</span><span> id</span>=<span>
"swdlform:apptab:_idJsp71:tbody_element"</span><br><<span>tr</span>><<span>td</span>>20080102.tar.gz</<span>td</span>><<span>
td</span>><<span>a</span><span> href</span>=<span>"#" </span><span>onclick</span>=<span>"return oamSubmitForm('20080102');" <br></span><span>id</span>=<span>"idJsp71:18"</span>
>Click</<span>a</span>></<span>td</span>></<span>tr<br></span>><br><<span>tr</span>><<span>td</span>>20080103.tar.gz</<span>td</span>><<span>td</span>><<span>
a</span><span> href</span>=<span>"#" </span><span>onclick</span>=<span>"return oamSubmitForm('20080103');" <br></span><span>id</span>=<span>"idJsp71:19"</span>>Click</<span>a</span>
></<span>td</span>></<span>tr<br></span>><br>.<br>.<br>.<br><br></<span>tbody</span>><br></<span>table</span>><br></pre>Is this possible?<br>If it is, an example would be greatly appreciated - I am brand new to webtest.
<br><br>Thanks for the help<br><br><br>
</blockquote></div><br>
------=_Part_31470_17463198.1199493452390--