Closed sjieg closed 9 years ago
When doing the following:
browser.goto 'google.com' dialog = browser.wait( :timeout => 1, :condition => :while, :like => [:div, :class, 'fbar'] ) D, [2015-07-16T17:00:46.621633 #7960] DEBUG -- #<IO:0x610b30>: Caught timeo ut: timed out after 10 seconds => #<Watir::HTMLElement:0x39e27cb4 located=true selector={element: (webdriv er element)}>
A log message is given that the function failed, but at the same time the element you were waiting for to disappear is returned.
When using :condition => :until an error is raised when failing. The same behavior is expected for :while.
:condition => :until
I've taken the liberty to look into the wait.rb file and I think I found the issue:
if not err.nil? and filter_results.empty? options[:exception] = err world.error(options) end
The error is only raised if there is NO result, but when waiting :while there will be a result if it failed.
Dupe of #26, of sorts.
When doing the following:
A log message is given that the function failed, but at the same time the element you were waiting for to disappear is returned.
When using
:condition => :until
an error is raised when failing. The same behavior is expected for :while.I've taken the liberty to look into the wait.rb file and I think I found the issue:
The error is only raised if there is NO result, but when waiting :while there will be a result if it failed.