[ 
http://jira.openqa.org/browse/WTR-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20058#action_20058
 ] 

Jarmo Pertman commented on WTR-470:
-----------------------------------

I'd suspect it being some really nasty timing issue then.

What is so special about the webpage under test? Does it manipulate DOM a lot? 
Does it redirect with the help of JavaScript or does something else 
interesting? What might make to trigger these errors with your webpage? Is it 
happening all the time or just sometimes?

In another words, try to think what makes your webpage so special when compared 
to some other random webpage. That's of course if some other random webpage 
won't raise these errors for you.

> ole_inner_elements timing issue
> -------------------------------
>
>                 Key: WTR-470
>                 URL: http://jira.openqa.org/browse/WTR-470
>             Project: Watir
>          Issue Type: Bug
>          Components: Wait
>    Affects Versions: 1.6.7
>         Environment: Running this on Windows XP with ie 7.
>            Reporter: Dan Franko
>            Priority: Major
>
> In container.rb sometimes when ole_inner_elements is called on account of 
> locator.elements.nil? being nill, the document.body.all fails to return 
> anything even when the browser is still present.  I managed to patch it 
> myself by inserting a rescue block, waiting a couple of seconds and trying 
> again, but I'm sure there's a more elegant way of doing it.
> {quote}
> locator.elements = ole_inner_elements if locator.elements.nil?
> def ole_inner_elements
>     return document.body.all
> end
> {quote}
> This is the error I get in this condition.  This is testing a C# web app, 
> which is using ajax.
> {quote}
> undefined method `all' for nil:NilClass
> ["c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/container.rb:776:in 
> `ole_inner_elements'", 
> "c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/container.rb:843:in 
> `locate_input_element'", 
> "c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/input_elements.rb:5:in 
> `locate'", 
> "c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/element.rb:308:in 
> `exists?'", "./test_functions.rb:220:in `delete_user'", 
> "./test_functions.rb:247:in `too_many_failed_logins'", "smoketest.rb:36"]
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.openqa.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to