It may be related but I have been seeing this all day once I put your suggestions into my script.

 

-e:1: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `method_missing': busy (WIN32OLERuntimeError)

    OLE error code:80004005 in <Unknown>

      <No Description>

    HRESULT error code:0x80020009

      Exception occurred.     from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `wait'

      from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2258:in `click'

      from (eval):1

 

The script continues and completes without further error.

 

By the way, $ie.button("...").click_no_wait worked, but $ie.button("...").ole_object.click did not I get this error:

 

  1) Error:

test_main(TC_ARM_Start):

NoMethodError: undefined method `click' for nil:NilClass

    C:/watir_bonus/working/ARM/tc_ARM_Start.rb:40:in `test_main'

 

--Mark

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Wednesday, March 15, 2006 4:38 PM
To: [email protected]
Subject: Re: [Wtr-general] Error when window closes using IE.attach

 

Replace this code:

  $ie.button("...").click

With this:

  $ie.button("...").ole_object.click

The problem is that the normal click method has in implicit "wait" and this is failing because it is polling the browser to see if it is still loading a page when the browser disappears (which in your case is correct).

This workaround does a click without a wait. Watir 1.5 has a new click_no_wait method which also should be able to handle this situation.

This in any case a bug. Feel free to post it to Jira if you'd like to see a fix.

Bret

On 3/15/06, Cain, Mark <[EMAIL PROTECTED]> wrote:

I am getting the following error when the window I have attached to closes and returns to the main window—actually the main window closes too and the error is displayed.

 

I can't send the web page due to proprietary and confidential information, but what it does is there is a name picker that pops up in a new window (the one I am attaching to) and once a name is selected clicking the button closes the window and transfers the selected name to the main window and is displayed in a select box.

 

Ruby version 1.8.4_16

Watir revision 934 (current from trunk)

 

  1) Error:

test_main(TC_ARM_Start):

WIN32OLERuntimeError: busy

    OLE error code:80004005 in <Unknown>

      <No Description>

    HRESULT error code:0x80020009

      Exception occurred.

    c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `method_missing'

    c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `wait'

    c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2253:in `click'

    C:/watir_bonus/working/ARM/tc_ARM_Start.rb:34:in `test_main'

exit

c:/ruby/lib/ruby/1.8/test/unit.rb:285:in `exit'

c:/ruby/lib/ruby/1.8/test/unit.rb:285

C:/watir_bonus/working/ARM/tc_ARM_Start.rb:13

 

 

My watir script:

    def gotoPopUpPage()

        $ie.goto("http://apwtst200.rl.gov/ARM/main.cfm?screen=0")

    end

   

    def test_main

      $d = Time.now.strftime("%m/%d/%Y")

      gotoPopUpPage()

      $ie.selectBox( :name, "Program").select("LMIT")

      $ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i)

      $ie.selectBox( :name, "myProjectID2").fireEvent("OnBlur")

      $ie.selectBox( :name, "DocumentMethod").select("by Checklist Number")

      $ie.textField( :name, "SearchString").set("TST")

      $ie.button("Search").click

     

      #$ie.selectBox( :name, "myProjectID2").select(/MARK-TEST/i)

      $ie.radio( :id, '72').set

      $ie.button(/Start/i).click

     

      $ie.selectBox( :name, "ProjectVersion").select(/4.4/i)

      #$ie.selectBox( :name, "namedisplay").select(/4.4/i)

      $ie.button("...").click

     

      sleep 2

      nw = IE.attach(:title, "ARM")

      nw.text_field( :name, "Filter").set("Cain, Mark")

      nw.button(:id, "PersonnelSearch").click

      nw.button(:id, "SelectButton").click

 

      $ie.status()

      $ie.text_field(:name, "d_date").set("#{d}")

      $ie.selectBox( :name, "d_time").select(/15 minutes/i)

      $ie.textArea(:name, "").set("Me\nMyself\nI")

     

    End

 

End

 

Anyone seen this before? 

 

I have used attach before without issue.

 

Thanks,

____________________
Mark L. Cain
LMIT - E *STARS ® ~ Lead Test Engineer
1981 Snyder, MSIN: G3-62, Richland, WA 99354
[EMAIL PROTECTED]
509.376.5458

"640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981

 


_______________________________________________
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