Last active
September 11, 2018 21:38
-
-
Save mottet-dev/66eb680ad2c4a30ed587387a98dd635e to your computer and use it in GitHub Desktop.
InstagramBot - signIn
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
import time | |
from selenium.webdriver.common.keys import Keys | |
# ... | |
def signIn(self): | |
self.browser.get('https://www.instagram.com/accounts/login/') | |
emailInput = self.browser.find_elements_by_css_selector('form input')[0] | |
passwordInput = self.browser.find_elements_by_css_selector('form input')[1] | |
emailInput.send_keys(self.email) | |
passwordInput.send_keys(self.password) | |
passwordInput.send_keys(Keys.ENTER) | |
time.sleep(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment