Hi,

Why does this fail:

  $IE0.goto("http://www.google.com/")
  $IE0.form( :name, "f").text_field( :name, "q").set("ruby")
  $IE0.form( :name, "f").button( :name, "btnG").click

This fails with:

WIN32OLERuntimeError: Failed to get IEnum Interface
    HRESULT error code:0x80020003
      Member not found.

If you look at the source of the google search page form "f" *does* exist and the text field and button exist within it.

This works:

  $IE0.goto("http://www.google.com/")
  $IE0.text_field( :name, "q").set("ruby")
  $IE0.button( :name, "btnG").click

But for a more complicated app that has several forms, which perhaps share names of objects, the first method is necessary. 

Watir WebRecorder correctly records the form for this very reason, but the first block of code fails, even though the form does exist, with those objects in it.  Is this a known problem, or am I missing something?

Thanks!

--
Marcus Tettmar
http://www.mjtnet.com/
Macro Scheduler & WebRecorder for Windows & Web Automation and Testing. WebRecorder for Ruby/Watir now available.
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to