Skip to content

Instantly share code, notes, and snippets.

@alexpodoff
Created November 21, 2016 16:35
Show Gist options
  • Save alexpodoff/9e944bb137d942f6a1cbe3564271f3b4 to your computer and use it in GitHub Desktop.
Save alexpodoff/9e944bb137d942f6a1cbe3564271f3b4 to your computer and use it in GitHub Desktop.
contacts
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