Created
May 25, 2016 23:57
-
-
Save morganwilde/d75629531d0d646a037dd4bcca034539 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def testFooter(self): | |
""" | |
Testing if footer contains a valid phone number. | |
""" | |
footer = driver.find_element(By.ID, 'footer-content') | |
paragraph = footer.find_element_by_css_selector('p') | |
phone = re.findall(r'phone \d{3}-\d{3}-\d{4}', paragraph.text) | |
self.assertEquals(len(phone), 1) | |
self.assertEquals('phone 510-885-3000', phone[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment