On 6/12/06, Manish Sapariya <[EMAIL PROTECTED]> wrote:
$ie.frame("mainFrame").table(:id, /tblMain/i).cells.each { |l|
    if l.text_field(:name, "hostName").exists? then
        puts "Flashing input box\n"
       l.text_field(:name, "hostName").flash
       end
}
Flashing input box
Flashing input box
Flashing input box
Flashing input box
Flashing input box
0
---------

irb says it found the field five times, but the html source has it listed
only once. It however flashesh the same input field.

Can somebody explain.
Thanks,
Manish

Q. A script says "Go to each cell in this particular table. If the cell contains a specific text field, flash it."
It flashes five times, but there is only one text field? How can this be?

A. There are five cells containing the text_field, which is actually located in a series of nested tables.

You are probably assuming that cells only walks through cells that belong to the table, but actually it yields any cells inside it. We are talking about adding a new method child_cells that would be more restrictive.

Bret
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to