[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>&nbsp;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>&nbsp;regards,<br>&nbsp;Rbert<br><br><div><span class="gmail_quote">2008/1/4, q a &lt;
<a href="mailto:qalab17@gmail.com">qalab17@gmail.com</a>&gt;:</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>&lt;<span>table</span><span> border</span>=<span>
&quot;1&quot;</span>&gt;<br>&lt;<span>thead</span>&gt;&lt;<span>tr</span>&gt;&lt;<span>th</span><span> class</span>=<span>
&quot;tableHeader&quot;</span>&gt;Filename&lt;/<span>th</span>&gt;&lt;<span>th</span><span> class</span>=<span>&quot;tableHeader&quot;</span>
&gt;Status&lt;/<span>th</span>&gt;&lt;/<span>tr</span>&gt;&lt;/<span>thead</span>&gt;<br>&lt;<span>tbody</span><span> id</span>=<span>
&quot;swdlform:apptab:_idJsp71:tbody_element&quot;</span><br>&lt;<span>tr</span>&gt;&lt;<span>td</span>&gt;20080102.tar.gz&lt;/<span>td</span>&gt;&lt;<span>
td</span>&gt;&lt;<span>a</span><span> href</span>=<span>&quot;#&quot; </span><span>onclick</span>=<span>&quot;return oamSubmitForm(&#39;20080102&#39;);&quot; <br></span><span>id</span>=<span>&quot;idJsp71:18&quot;</span>
&gt;Click&lt;/<span>a</span>&gt;&lt;/<span>td</span>&gt;&lt;/<span>tr<br></span>&gt;<br>&lt;<span>tr</span>&gt;&lt;<span>td</span>&gt;20080103.tar.gz&lt;/<span>td</span>&gt;&lt;<span>td</span>&gt;&lt;<span>
a</span><span> href</span>=<span>&quot;#&quot; </span><span>onclick</span>=<span>&quot;return oamSubmitForm(&#39;20080103&#39;);&quot; <br></span><span>id</span>=<span>&quot;idJsp71:19&quot;</span>&gt;Click&lt;/<span>a</span>
&gt;&lt;/<span>td</span>&gt;&lt;/<span>tr<br></span>&gt;<br>.<br>.<br>.<br><br>&lt;/<span>tbody</span>&gt;<br>&lt;/<span>table</span>&gt;<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--