It looks like a frame access error. There's a workaround in the latest code in svn. Follow the instructions for Installing a gem from source on the FAQ page and try it again.
http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgem -Charley On 3/23/07, Mathew Jacob <[EMAIL PROTECTED]> wrote:
Hi, I installed latest gem and run the script. But I am getting following error in Run-time. *** WARNING *** Windows users should check the "Run process in terminal" check box in the Debugger Preferences to see STDOUT and STDERR output in real time. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in `method_missing': document (WIN32OLERuntimeError) OLE error code:80070005 in <Unknown> Access is denied. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir- 1.5.1.1158/./watir.rb:1830:in `wait' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1829:in `wait' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:2577:in `click' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./MongoFnDef.rb:39:in `login' from C:/watir/MongoMain.rb:23 Thanks in advance, Mathew *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Angrez Singh *Sent:* Friday, March 23, 2007 11:06 AM *To:* wtr-general@rubyforge.org *Subject:* Re: [Wtr-general] Unable to select the button from button-menu Hi Mathew, Just looked at the Yahoo mail app (not the beta one) and had a look at the HTML. The options that you are trying to select like "Mark as Read", "Mark as Unread" are in <li> tags. So you need to access them using xpath and then fire click event. Following code works for me for marking first message in inbox are read. require 'watir' include Watir ie = IE.new ie.goto("http://mail.yahoo.com") ie.maximize() ie.text_field(:name, "login").set(username) ie.text_field(:name, "passwd").set(password) ie.button(:value, "Sign In").click() ie.button(:id, "checkmailbutton").click() # select first message. ie.radio(:id, "folderviewmsg0checkbox").set() # click on mark button so as options can be displayed ie.button(:value, "Mark").click() # select <li> element that has text "Mark as Read" element = ie.element_by_xpath("//li[contains(.,'Mark as Read')]") # Print properties of the element just to make sure you selected correct element. puts element.value puts element.tagName puts element.innerHTML # fire click event. element.click() Let me know if this works. Regards, Angrez
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general