I'd like to understand why this logic is present here:
|
if wait.positive? |
|
# Wait a bit after command and check if iteration has |
|
# changed which means there was some network event for |
|
# the main frame and it started to load new content. |
|
@event.wait(wait) |
|
if iteration != @event.iteration |
|
set = @event.wait(timeout) |
|
raise TimeoutError unless set |
|
end |
|
end |
I see that wait param passed in go_to method and some methods related to mouse events.
So basically it means if I click on element and navigation happens after down event, the click will fail if navigation doesn't finish within timeout despite the click was successful and led to navigation.
Shouldn't be this "wait for navigation" logic controlled by client and not included in mouse class?
I'd like to understand why this logic is present here:
ferrum/lib/ferrum/page.rb
Lines 344 to 353 in 5271866
I see that
waitparam passed ingo_tomethod and some methods related to mouse events.So basically it means if I click on element and navigation happens after
downevent, the click will fail if navigation doesn't finish within timeout despite the click was successful and led to navigation.Shouldn't be this "wait for navigation" logic controlled by client and not included in mouse class?