[Wtr-general] WIN32OLERuntimeError redux - innertext
Alan Ark
arkie at compli.com
Tue Jul 18 12:52:58 EDT 2006
Hi guys.
Just wanted to report back to the list on this issue.
What I had done:
Put watir/waiter into my 1.4.1 version of watir. I also had to update watir/exceptions.rb as well.
Initially I thought that was working, but after running more tests, the error still appears once in a while.
The next suggestion was to upgrade my Watir version to 1.5. I’ll try this at a future time, but not at this moment.
Thanks for the suggestions.
-Alan
_____
From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Alan Ark
Sent: Thursday, July 13, 2006 7:46 AM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] WIN32OLERuntimeError redux - innertext
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: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord
Sent: Wednesday, July 12, 2006 5:20 PM
To: wtr-general at 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 <HYPERLINK "mailto:rand.thacker at gmail.com"rand.thacker at gmail.com> 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 <HYPERLINK "mailto:bret at pettichord.com" \n bret at pettichord.com> 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
HYPERLINK "mailto:Wtr-general at rubyforge.org" \nWtr-general at rubyforge.org
HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://rubyforge.org/mailman/listinfo/wtr-general
--
"I am the most humble person in the world!"
_______________________________________________
Wtr-general mailing list
HYPERLINK "mailto:Wtr-general at rubyforge.org"Wtr-general at rubyforge.org
HYPERLINK "http://rubyforge.org/mailman/listinfo/wtr-general" \nhttp://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
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 7/17/2006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060718/fcf2e372/attachment.html
More information about the Wtr-general
mailing list