Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python code to open facebook and login with username and password

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
# Step 1) Open Firefox 
browser = webdriver.Firefox()
# Step 2) Navigate to Facebook
browser.get("http://www.facebook.com")
# Step 3) Search & Enter the Email or Phone field & Enter Password
username = browser.find_element_by_id("email")
password = browser.find_element_by_id("pass")
submit   = browser.find_element_by_id("loginbutton")
username.send_keys("you@email.com")
password.send_keys("yourpassword")
# Step 4) Click Login
submit.click()
Comment

PREVIOUS NEXT
Code Example
Python :: flask run function every minute 
Python :: numpy online practice 
Python :: django admin make column link 
Python :: capitalise.texts 
Python :: sf.query_all( ) dataFrame records relation Id 
Python :: pytest rerun last failed 
Python :: django annotate datetime field to char 
Python :: print all elements of dictionary except one in python 
Python :: convert dictionary to 2d array python 
Python :: print numbers with underscores python 
Python :: reverse the order of list elements 
Python :: flask get summernote text 
Python :: controlliing a fill pattern in matplotlib 
Python :: alan watts 
Python :: while scraping table data i am getting output as none 
Python :: who is bayceee roblox id 
Python :: python - matching people based on city 
Python :: 2600/6 
Python :: shorter Max fonction code in python 
Python :: equivalent of case_when in r in pandas 
Python :: fibonacci program in python 
Python :: code.org void loops 
Python :: Count total number of null, isna sum python 
Python :: how to create simple window in wxPython 
Python :: fastapi authentication 
Python :: mechanize python fill 
Python :: store array to nii file 
Python :: python clean filename 
Python :: space separated dictionary input in python 
Python :: Realtime-yahoo-stock_price 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =