Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Add a sleep to avoid clicking the loading screen #102

Merged
merged 2 commits into from
Nov 6, 2015

Conversation

davehunt
Copy link
Member

@davehunt davehunt commented Nov 5, 2015

Unfortunately there's no good way to wait for the loading spinner to settle. We can't wait for it to be hidden as it is initially hidden, so we'd continue too soon. We can't reliably wait for it to be visible (and then hidden) because it's often displayed for such a short amount of time that we might miss it due to latency. This has only become an issue in Firefox since Selenium 2.48, which brought the behaviour closer to a real user, and we're effectively clicking the loading message instead of the submit button. The best fix would be for Persona to give us some indication that the loading screen has been displayed but is no longer displayed. For now, I'm going to add a sleep of 5 seconds, which should be plenty of time for the loading screen to appear, if not also disappear. For this, I can only apologise!

This is the change in Selenium that caused this: SeleniumHQ/selenium@0eec81d

The change has caused others to see similar issues: SeleniumHQ/selenium#1202

I have raised the following issue against Persona: mozilla/persona#4227

Note that this is not a bug in Selenium, it is an enhancement that has highlighted an issue with our Persona automation.

@davehunt
Copy link
Member Author

davehunt commented Nov 5, 2015

@bobsilverberg would you mind reviewing? Thanks. 😴

@bobsilverberg
Copy link
Contributor

LGTM, and all the tests pass locally with Se 2.48. r+

@davehunt davehunt merged commit 2a01b05 into mozilla:master Nov 6, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants