made is_browser_on_page actually check for the right page in AutoAuthPage

This commit is contained in:
Christine Lytwynec
2014-05-16 14:06:47 -04:00
parent 6396373bd5
commit ed672f079e
2 changed files with 6 additions and 2 deletions

View File

@@ -65,7 +65,9 @@ class AutoAuthPage(PageObject):
return url
def is_browser_on_page(self):
return True
message = self.q(css='BODY').text[0]
match = re.search(r'Logged in user ([^$]+) with password ([^$]+) and user_id ([^$]+)$', message)
return True if match else False
def get_user_id(self):
"""

View File

@@ -65,7 +65,9 @@ class AutoAuthPage(PageObject):
return url
def is_browser_on_page(self):
return True
message = self.q(css='BODY').text[0]
match = re.search(r'Logged in user ([^$]+) with password ([^$]+) and user_id ([^$]+)$', message)
return True if match else False
def get_user_id(self):
message = self.q(css='BODY').text[0].strip()