Created
November 21, 2016 16:35
-
-
Save alexpodoff/9e944bb137d942f6a1cbe3564271f3b4 to your computer and use it in GitHub Desktop.
contacts
This file contains 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 get_contact_list(self): | |
wd = self.app.wd | |
self.contact_page() | |
contacts = [] | |
rows = wd.find_elements_by_name("entry") | |
for row in rows: | |
cells = row.find_elements_by_tag_name("td") | |
id = cells[0].find_element_by_name("selected[]").get_attribute("value") | |
name = cells[1].text | |
lastname = cells[2].text | |
contacts.append(Contact(id=id, name=name, lastname=lastname)) | |
return contacts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment