I believe Mark has it right.  Crisper script, exists? is on line 65:

inboxtbl = $ie.frame(:id, 'UIFrame').table(:class, 'InboxTable')
rows = inboxtbl.row_count_excluding_nested_tables()
puts TimeStr() + "Back from in-box click, " + rows.to_s + " rows"

if inboxtbl.row(:index, (rows + 1).to_s).cell(:class, 'Sbj').exist?
        puts TimeStr() + "Row " + (rows + 1).to_s + " exists!"
        end # if exists?


similar results:
16:11:31 Back from in-box click, 12 rows
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_ex
ists': Unable to locate element, using :index,
"13" (Watir::Exception::UnknownOb
jectException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:126
:in `document'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
locator.rb:31:
in `each_element'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
locator.rb:38:
in `locate'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
container.rb:7
49:in `locate_tagged_element'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
table.rb:328:i
n `locate'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:273
:in `exist?'
        from C:/QA/ECS_Tests/HotWatir.rb:65

So I guess what we're saying is that the .exists? really applies only
to the immediately previous element, if an earlier element fails, we
get the exception.  That's orderly, if not desirable.

Bill Mosteller
Eloqua
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to