If there is one I have never found it.  What I have had to do was do a
view source on the page.  I then do <ctr>f, enter '<table' (without the
'') into the search field, click the Next button and--starting at the
top--start counting.  The indexing is one-based so when you get to the
desired table that is your index.  Old-school I know but effective.

By the way if you every find one of those 'index-finding-methods' let me
know.

--Mark


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Lolis
Sent: Wednesday, November 15, 2006 6:46 AM
To: [email protected]
Subject: [Wtr-general] Find parent table index from a specific element
within

Lets say we have the following

Table
.TR
..TD
..TD
...SPAN text=findme
..TD
...Text Input Field

The only element in this entire section that I can identify uniquely is
the span. The span happens to be located within a table. That table also
contains the text input field (my real goal). So is there a way to find
out what the table index is that contains a span? To explain it another
way, here is some fake code.

table_index =
$ie.frame('frame1').span(:text,'findme').get_parent_table_index()
$ie.frame('frame1').table(:index,table_index)[1][3].text_field(:index,
1).set('i did it!')
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5270&messageID=14638#14638
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to