<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.28">
<TITLE>Lists question</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Has anyone written code to handle <UL>/<OL> and <LI> tags -- as a collection with iterators?</FONT>
<BR><FONT SIZE=2 FACE="Arial">I have the following HTML -- and I'd like to be able to handle the LIs as a collection and iterate through them (and access the link within) based on the text -- has anyone done this? If not I presume I'll have to extend watir and essentially clone the Spans, Divs or Ps classes and methods?</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Any suggestions?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I'd like to do something link this:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">$ie.lis.each do |li|</FONT>
<BR><FONT SIZE=2 FACE="Arial"> if li.text == /FOO/</FONT>
<BR><FONT SIZE=2 FACE="Arial"> puts 'FOO found'</FONT>
<BR><FONT SIZE=2 FACE="Arial"> li.link(:index, 1).click</FONT>
<BR><FONT SIZE=2 FACE="Arial"> else</FONT>
<BR><FONT SIZE=2 FACE="Arial"> puts 'FOO not found'</FONT>
<BR><FONT SIZE=2 FACE="Arial"> end</FONT>
<BR><FONT SIZE=2 FACE="Arial">end</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><span class="errorMsg" style="FONT-WEIGHT: bold"><p>This document can not be saved until the following issues are resolved: </p></FONT></P>
<P><FONT SIZE=2 FACE="Arial"> <ul></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <li>REVENUE CITY: Please fill in this required field.</FONT>
<BR><FONT SIZE=2 FACE="Arial"> <a onclick="ClickByID2('RevenueCity')"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <img style="VERTICAL-ALIGN: 0px" height="13" alt="Go to the field" src="<A HREF="http://earl:9080/foep/errorMsg.gif">http://earl:9080/foep/errorMsg.gif</A>" width="15" border="0"></a> </FONT></P>
<P><FONT SIZE=2 FACE="Arial"> </li></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <li>LEGAL ENTITY: Please fill in this required field.</FONT>
<BR><FONT SIZE=2 FACE="Arial"> <a onclick="ClickByID2('LegalEntity')"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <img style="VERTICAL-ALIGN: 0px" height="13" alt="Go to the field" src="<A HREF="http://earl:9080/foep/errorMsg.gif">http://earl:9080/foep/errorMsg.gif</A>" width="15" border="0"></a> </FONT></P>
<P><FONT SIZE=2 FACE="Arial"> </li></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </ul></FONT>
<BR><FONT SIZE=2 FACE="Arial"></span></FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>
<table><tr><td bgcolor=#ffffff><font color=#000000>The content contained in this electronic message is not intended to<br>
constitute formation of a contract binding TWTC. TWTC will be<br>
contractually bound only upon execution, by an authorized officer, of<br>
a contract including agreed terms and conditions or by express<br>
application of its tariffs.<br>
<br>
This message is intended only for the use of the individual or entity<br>
to which it is addressed. If the reader of this message is not the<br>
intended recipient, or the employee or agent responsible for<br>
delivering the message to the intended recipient, you are hereby<br>
notified that any dissemination, distribution or copying of this<br>
message is strictly prohibited. If you have received this<br>
communication in error, please notify us immediately by replying to<br>
the sender of this E-Mail or by telephone.<br>
</font></td></tr></table>