Skip to content

Instantly share code, notes, and snippets.

@PaburoTC
Last active April 29, 2020 17:54
Show Gist options
  • Save PaburoTC/542116f6aff0e7c3d15212356e3bad92 to your computer and use it in GitHub Desktop.
Save PaburoTC/542116f6aff0e7c3d15212356e3bad92 to your computer and use it in GitHub Desktop.
def __login(self, username, pswd):
sleep(2)
username_input = self.driver.find_element_by_xpath("//input[@name=\"username\"]")
username_input.send_keys(username)
pswd_input = self.driver.find_element_by_xpath("//input[@name=\"password\"]")
pswd_input.send_keys(pswd)
login = self.driver.find_element_by_xpath("//button[@type=\"submit\"]")
login.click()
sleep(2)
notifications_off = self.driver.find_element_by_xpath("//button[contains(text(),'Not Now')]")
notifications_off.click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment