Trying this on a faster machine and against some other pages, I'm noticed
flaws in my previous testing. Some of the properties, ex Element#height,
start as if the sliding container was visible. When the animation starts,
they get reset. For example, I saw the height go from 346, down to 1 and
Element#height didn't work for me. It was returning height of the div
including the part cut-off by the overflow. The clientHeight gave the
height excluding the cut-off portion.
Justin
On Tuesday, September 25, 2018 at 2:33:06 PM UTC-4, Titus Fortner wrote:
>
> Also, Watir has a
Also, Watir has a `Element#height` method, so you shouldn't need to resort
to JS to get that value.
On Tuesday, September 25, 2018 at 11:31:32 AM UTC-7, Titus Fortner wrote:
>
> Yeah, it's clicking, but I suspect JS event isn't ready to act yet.
>
> Note the style transition attributes there.
Yeah, it's clicking, but I suspect JS event isn't ready to act yet.
Note the style transition attributes there. Try waiting for the element
style to not include "overflow" after the element becomes present. You can
also try waiting for the size of the slide dialog container to equal some
It looks like the button itself isn't sliding. The div that contains it is
actually increasing in height. So my previous suggestions about waiting for
the button to stop moving doesn't work.
I'm still not quite clear on how the click is getting intercepted. However,
waiting for the section
Hi Titus & Justin
My theory of actually clicking the button before the pop is fully loaded
could be wrong, because even if its not fully loaded the click on "continue
as guest" should dismiss the popup.
Please see the video here
> 3. The click is sent to the coordinates, which since the button has since
moved, will not click the button
If this happened, there should be a stale element exception, which Watir
would continue to relocate until it worked, which is why I suspect it is JS
element/action binding related,
(Sorry, if some of this repeats Titus's response. I was half way through
this when he replied.)
If I'm envisioning the sliding correctly, I believe what happens is:
1. The button starts sliding on to the page (at which point it'll be
considered present)
2. The coordinates of the button are
This kind of dynamic code is difficult.
Firstly, `wait_until(&:present?).click` is currently redundant. The wait
will happen automatically if you just do: `click`
Essentially the driver is processing the element as displayed before the
desired action is attached to that element. Ideally, the