Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Created February 3, 2022 06:22
Show Gist options
  • Save Abhayparashar31/4b91b884f2fc9f909d681a136e45179c to your computer and use it in GitHub Desktop.
Save Abhayparashar31/4b91b884f2fc9f909d681a136e45179c to your computer and use it in GitHub Desktop.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
PATH = 'chromedriver.exe' ##Same Directory as Python Program
driver = webdriver.Chrome(executable_path=PATH)
driver.get("https://www.facebook.com/")
def login(id,password):
email = driver.find_element_by_id("email")
email.send_keys(id)
Password = driver.find_element_by_id("pass")
Password.send_keys(password)
button = driver.find_element_by_name("login").click()
pass
login("YOUR_LOGIN_ID","YOUR_PASSWORD")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment