<!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 &lt;UL&gt;/&lt;OL&gt; and &lt;LI&gt; 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?&nbsp; If not I presume I'll have to extend watir and essentially clone the&nbsp; 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">&nbsp; if li.text == /FOO/</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp; puts 'FOO found'</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp; li.link(:index, 1).click</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; else</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp; puts 'FOO not found'</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; end</FONT>

<BR><FONT SIZE=2 FACE="Arial">end</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&lt;span class=&quot;errorMsg&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;&lt;p&gt;This document can not be saved until the following issues are resolved: &lt;/p&gt;</FONT></P>

<P><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; &lt;ul&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li&gt;REVENUE CITY: Please fill in this required field.</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a onclick=&quot;ClickByID2('RevenueCity')&quot;&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;img style=&quot;VERTICAL-ALIGN: 0px&quot; height=&quot;13&quot; alt=&quot;Go to the field&quot; src=&quot;<A HREF="http://earl:9080/foep/errorMsg.gif">http://earl:9080/foep/errorMsg.gif</A>&quot; width=&quot;15&quot; border=&quot;0&quot;&gt;&lt;/a&gt; </FONT></P>

<P><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/li&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li&gt;LEGAL ENTITY: Please fill in this required field.</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a onclick=&quot;ClickByID2('LegalEntity')&quot;&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;img style=&quot;VERTICAL-ALIGN: 0px&quot; height=&quot;13&quot; alt=&quot;Go to the field&quot; src=&quot;<A HREF="http://earl:9080/foep/errorMsg.gif">http://earl:9080/foep/errorMsg.gif</A>&quot; width=&quot;15&quot; border=&quot;0&quot;&gt;&lt;/a&gt; </FONT></P>

<P><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/li&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; &lt;/ul&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&lt;/span&gt;</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>