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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.