Try something like:
 
$ie.table(:index, 2)[1][1].flash
 
Index is one-based and derived by counting the topmost table (do a view
source >> ctrl + f >> '<table'--without single quotes) and count each
table tag until the desired table is reached.  The index number in your
example that is two.

--Mark

 

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve
Tangsombatvisit
Sent: Tuesday, February 27, 2007 11:52 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Accessing Nested Tables


Hi,
 
I am trying to access a cell in a nested table structure. The structure
is something like this
 
<TABLE>
     <TBODY>
          <TR>
               <TD>
                    <TABLE>   #table 2
                             <TR><TD></TD></TR>
                    </TABLE>
               </TD>
          </TR>
     </TBODY>
</TABLE>
 
My question is how do I gain access to a cell inside the second table? I
have tried grabbing the internal cell using array structure
 
IE table[1][1]  and then trying table operations on that object, but the
object is not recognized as a table (it's still recognized as a
TableCell object). Is there a way I can cast the TableCell object as a
Table object and grab the data that way? Or am I going about this the
wrong way altogether?
 
Thanks for your help in advanced.
 
Steve Tang
 
 
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to