Last active
April 18, 2020 18:23
-
-
Save kmandana/f7443e35cc90ff3697fe0af1fee26bc7 to your computer and use it in GitHub Desktop.
signIn method
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 signIn(self): | |
| self.browser.get("https://www.instagram.com") | |
| username_element = WebDriverWait(self.browser, 5).until(EC.presence_of_element_located((By.CSS_SELECTOR, "#react-root > section > main > article > div.rgFsT > div:nth-child(1) > div > form > div:nth-child(2) > div > label > input"))) | |
| username_element.click() | |
| username_element.send_keys(self.username) | |
| password_element = self.browser.find_element_by_css_selector("#react-root > section > main > article > div.rgFsT > div:nth-child(1) > div > form > div:nth-child(3) > div > label > input") | |
| password_element.click() | |
| password_element.send_keys(self.password) | |
| password_element.send_keys(Keys.RETURN) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment