Closed Bug 1307119 Opened 8 years ago Closed 8 years ago

Marionette locking up Web page UI / freezing animation

Categories

(Remote Protocol :: Marionette, defect)

Version 3
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: agibson, Unassigned)

Details

Attachments

(1 file)

[Selenium 3.0.0b3 / Geckodriver v0.10.0 / Firefox 49.0.1]

I'm experiencing some intermittent issues running a fairly simple UI test with the above combination.

The test opens various pages on mozilla.org (such as https://www.allizom.org/en-US/mission/) and asserts some expected default values for the newsletter form. Before asserting that the form values are correct, the test first clicks the "Sign up now" button and waits for the hidden privacy checkbox to become visible.

The issue is that often the form does not expand fully, it gets stuck mid-transition. This only seems to happen when using Firefox 49 / GeckoDriver. I don't get the same issue running the tests using Chrome using Selenium 3.0.0b3, or testing manually.

I've attached a screenshot from one of the failures that was generated in the HTML report, which shows the partly visible form.

Test failure exception: https://gist.github.com/alexgibson/c55228c1e6445e7fe7e12b138f7e1987
I'm able to reproduce this (in release and today's nightly), and it seems that adding a short sleep between clicking the submit button and waiting for the checkbox to be visible in tests/pages/regions/newsletter.py makes it pass consistently. This would suggest that the explicit wait for visibility is somehow interrupting the animation that would make the checkbox displayed.
(In reply to Dave Hunt (:davehunt) from comment #2)
> I'm able to reproduce this (in release and today's nightly), and it seems
> that adding a short sleep between clicking the submit button and waiting for
> the checkbox to be visible in tests/pages/regions/newsletter.py makes it
> pass consistently. This would suggest that the explicit wait for visibility
> is somehow interrupting the animation that would make the checkbox displayed.

Yeah I can confirm that adding an implicit wait of 1 second seems enough to work around the issue :) It would be great if we could find the root cause of the issue here and fix it though, as the workaround it somewhat brittle and slows down our tests.
(In reply to Alex Gibson [:agibson] from comment #3)
> Yeah I can confirm that adding an implicit wait of 1 second seems enough to
> work around the issue :) It would be great if we could find the root cause
> of the issue here and fix it though, as the workaround it somewhat brittle
> and slows down our tests.

Sure, I wasn't advocating it as a workaround. Sleeping is evil. :)
I'm seeing the same intermittent failures on pretty much any test that waits for visibility of an element which is being animated via JS.
How long take those animations? I just wonder how often we actually check for the visibility during the animation inside of wait.until(). Can you try to increase the interval and check if that makes a difference?
(In reply to Henrik Skupin (:whimboo) from comment #6)
> How long take those animations? I just wonder how often we actually check
> for the visibility during the animation inside of wait.until(). Can you try
> to increase the interval and check if that makes a difference?

The animation takes 400ms. I'll see if I can increase the interval and report back if any difference is made
The good news is I don't seem to be able to reproduce this bug any longer after updating to Selenium v3.0.1 and pytest-selenium v1.5.0. I'm going to close this as WORKSFORME, but will reopen if it does start occurring again.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: