Permalink
Browse files

Updated for changes in 2012.03.14

  • Loading branch information...
1 parent eafa3d7 commit 569cf4464bd377bbf9a885d06fa7cd2285d2d7c4 @davehunt committed Mar 29, 2012
Showing with 6 additions and 20 deletions.
  1. +3 −2 examples/sign_in.py
  2. +2 −9 pages/rc/sign_in.py
  3. +1 −9 pages/webdriver/sign_in.py
View
@@ -28,8 +28,8 @@ def test_sign_in_to_my_favorite_beer_using_webdriver(self):
browser_id = BrowserID(sel)
browser_id.sign_in(self._email, self._password)
- sel.implicitly_wait(10)
- assert sel.find_element_by_id('logout').is_displayed
+ sel.implicitly_wait(20)
+ assert sel.find_element_by_id('logout').is_displayed()
sel.quit()
def test_sign_in_to_my_favorite_beer_using_rc(self):
@@ -39,6 +39,7 @@ def test_sign_in_to_my_favorite_beer_using_rc(self):
'http://myfavoritebeer.org')
sel.start()
sel.open('/')
+ time.sleep(5)
sel.click('css=#loginInfo .login')
# BrowserID
View
@@ -12,8 +12,7 @@ class SignIn(Base):
_email_locator = 'id=email'
_password_locator = 'id=password'
_next_locator = 'css=button.start'
- _select_email_locator = 'css=button.returning'
- _sign_in_locator = 'id=signInButton'
+ _sign_in_locator = 'css=button.returning'
def __init__(self, *args, **kwargs):
Base.__init__(self, *args, **kwargs)
@@ -42,12 +41,7 @@ def password(self, value):
def click_next(self):
"""Clicks the 'next' button."""
self.selenium.click(self._next_locator)
- self.wait_for_element_visible(self._select_email_locator)
-
- def click_select_email(self):
- """Clicks the 'select email' button."""
- self.selenium.click(self._select_email_locator)
- self.wait_for_element_visible(self._sign_in_locator)
+ self.wait_for_element_visible(self._password_locator)
def click_sign_in(self):
"""Clicks the 'Sign In' button."""
@@ -59,5 +53,4 @@ def sign_in(self, email, password):
self.email = email
self.click_next()
self.password = password
- self.click_select_email()
self.click_sign_in()
View
@@ -15,8 +15,7 @@ class SignIn(Base):
_email_locator = (By.ID, 'email')
_password_locator = (By.ID, 'password')
_next_locator = (By.CSS_SELECTOR, 'button.start')
- _select_email_locator = (By.CSS_SELECTOR, 'button.returning')
- _sign_in_locator = (By.ID, 'signInButton')
+ _sign_in_locator = (By.CSS_SELECTOR, 'button.returning')
def __init__(self, *args, **kwargs):
Base.__init__(self, *args, **kwargs)
@@ -53,12 +52,6 @@ def click_next(self):
WebDriverWait(self.selenium, self.timeout).until(
lambda s: s.find_element(*self._password_locator).is_displayed())
- def click_select_email(self):
- """Clicks the 'select email' button."""
- self.selenium.find_element(*self._select_email_locator).click()
- WebDriverWait(self.selenium, self.timeout).until(
- lambda s: s.find_element(*self._sign_in_locator).is_displayed())
-
def click_sign_in(self):
"""Clicks the 'Sign In' button."""
self.selenium.find_element(*self._sign_in_locator).click()
@@ -69,5 +62,4 @@ def sign_in(self, email, password):
self.email = email
self.click_next()
self.password = password
- self.click_select_email()
self.click_sign_in()

0 comments on commit 569cf44

Please sign in to comment.