[ http://jira.openqa.org/browse/WTR-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20056#action_20056 ]
Dan Franko commented on WTR-470: -------------------------------- I don't seem to run into that error with 1.6.5. > 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 Wtr-development@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development