Permalink
Browse files

Merge pull request #81 from chirarobert/wait_for_loading

Added a wait for the loading spinner to disappear when tapping next afte...
  • Loading branch information...
2 parents d3081b4 + 539f538 commit 8fa190d12e3e9468a8a2a4958c544e287257fd05 @AndreiH AndreiH committed Jul 7, 2014
Showing with 5 additions and 0 deletions.
  1. +5 −0 browserid/pages/sign_in.py
@@ -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_]')
@@ -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(

0 comments on commit 8fa190d

Please sign in to comment.