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

Commit

Permalink
Merge pull request #81 from chirarobert/wait_for_loading
Browse files Browse the repository at this point in the history
Added a wait for the loading spinner to disappear when tapping next afte...
  • Loading branch information
AndreiH committed Jul 7, 2014
2 parents d3081b4 + 539f538 commit 8fa190d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions browserid/pages/sign_in.py
Expand Up @@ -15,6 +15,7 @@
class SignIn(Base):

_form_completing_loading_locator = (By.CSS_SELECTOR, '.form.completing.loading')
_checking_email_provider_loading_locator = (By.CSS_SELECTOR, '#load .loadingSpinner')
_this_is_not_me_locator = (By.CSS_SELECTOR, '.isDesktop.thisIsNotMe')
_signed_in_email_locator = (By.CSS_SELECTOR, 'label[for=email_0]')
_emails_locator = (By.CSS_SELECTOR, 'label[for^=email_]')
Expand Down Expand Up @@ -171,6 +172,10 @@ def click_next(self, expect='password'):
else:
self.selenium.find_element(*self._mobile_next_locator).click()

WebDriverWait(self.selenium, self.timeout).until(
lambda s: not s.find_element(
*self._checking_email_provider_loading_locator).is_displayed())

if expect == 'password':
WebDriverWait(self.selenium, self.timeout).until(
lambda s: s.find_element(
Expand Down

0 comments on commit 8fa190d

Please sign in to comment.