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 mozilla#80 from AndreiH/add_wait_after_sign_in
Browse files Browse the repository at this point in the history
Adding wait after clicking sign in.
  • Loading branch information
chirarobert committed Jul 7, 2014
2 parents 71e70bb + 7833d99 commit d3081b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions browserid/pages/sign_in.py
Expand Up @@ -14,6 +14,7 @@

class SignIn(Base):

_form_completing_loading_locator = (By.CSS_SELECTOR, '.form.completing.loading')
_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 @@ -184,6 +185,9 @@ def click_next(self, expect='password'):
def click_sign_in(self):
"""Clicks the 'sign in' button."""
self.selenium.find_element(*self._sign_in_locator).click()
WebDriverWait(self.selenium, self.timeout).until(
lambda s: s.find_element(
*self._form_completing_loading_locator).is_displayed())
self.switch_to_main_window()

def click_sign_in_returning_user(self, expect=None):
Expand Down

0 comments on commit d3081b4

Please sign in to comment.