Note: by the time I finished writing up this question, the solution presented itself, but maybe others may find this useful, or could offer alternatives.
I have read the following articles:
this thread: https://groups.google.com/forum/#!topic/ruby-capybara/Mz7txv1Sm0U
this poltergeist issue: https://github.com/jnicklas/capybara/issues/19
this blog: https://nulogy.com/articles/sleep-is-for-the-weak#.VNVcIrDF8vs
and this stackoverflow question: Capybara synchronize with has_no_css?
but still cannot piece together an answer for this particular problem.
I want to wait until an element on the page disappears before continuing.
This element overlaps another element I want to click. When I try to click the target element anyway, I get this error:
Capybara::Poltergeist::MouseEventFailed:
Firing a click at co-ordinates [1006, 322] failed. Poltergeist detected another element with CSS selector 'html body.widgets div#select2-drop-mask.select2-drop-mask' at this position. It may be overlapping the element you are trying to interact with. If you don't care about overlapping elements, try using node.trigger('click').
I tried using the .trigger('click')
and .trigger(:click)
even, but it seems to have no effect.
Some other things I have tried ('thing' is the disappearing element):
@page.wait_until_thing_invisible
SitePrism::TimeOutWaitingForElementInvisibility:
execution expired