Thanks for the leads folks.

 

I’m busy with a new hire, but once I try these ideas, I will report back to the list.

 

Much appreciated.

-Alan

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Wednesday, July 12, 2006 5:20 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] WIN32OLERuntimeError redux - innertext

 

That confirms that it is a synchronization problem. I think those useless calls are really the moral equivalent of sleep statements.

Probably the cleanest and most reliable solution would be to use this after your call to IE.attach:

  require 'watir/waiter'
  WATIR::Waiter.wait_until { $ie.some_element_i_know_should_be_there.exists? }

Although this library is packaged with Watir 1.5, it is a separate file (watir/waiter.rb) and can be used with 1.4 if you copy it over manually.

Bret

On 7/12/06, Rand Thacker <[EMAIL PROTECTED]> wrote:

I've even run into problems before where $ie.wait didn't seem to do the trick.  Usually it was when the pages where doing a redirect or some other craziness that I hadn't planned on.

My workaround was to go ahead and do the $ie.wait, then I threw in some thing like this:
  xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase')
  xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase_either')
and just ignore the return values...  and do your actions/assertions after this.
I've did it twice because once helped, but didn't solve it everytime.

I'm not running into those issues anymore.

I know it's a hack, but it sure worked for me.  Hope it helps someone else out there.

On 7/12/06, Bret Pettichord < [EMAIL PROTECTED]> wrote:

 

Sounds like a synchronization problem. There was a known synchronization problem with IE.attach in 1.4.1. That can be avoided if you call wait after attach. Thus:

 

                        $ie=IE.attach(:title,/^Compli:/)

                        $ie.wait # add this line

                        $ie.set_fast_speed()

                        navigateToInbox($ie)

 

But depending on what is in navigateToInbox, i can't tell if that is the problem here. Can you show the code in navigateToInbox?

And if this change fixes your problem, let us know. I'm wondering if we shouldn't release this fix as 1.4.2.

Bret


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general




--
"I am the most humble person in the world!"


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

 

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to