[
http://jira.openqa.org/browse/WTR-470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Charley Baker resolved WTR-470.
-------------------------------
Assignee: Jarmo Pertman
Resolution: Not a problem
I'd posit that this is not an issue. That is to say that we do lazy load
components on web pages which without further examples might indicate what
you're seeing. This is easily fixed by handling AJAX events with waiting for
certain controls to exist. Taza is an example of a framework where we've
handled this, there are a few others.
I'm assigning this to Jarmo to close, to make sure I'm not missing something,
but this doesn't seem like an issue, more of a question. Sorry if I got it
wrong, and ask questions on the mailing list or ping me.
> 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
> Assignee: Jarmo Pertman
> 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