Saturday, October 19, 2019

Facebook login using python Script[Selenium]

Facebook login using python [Script]

What Is Selenium WebDriver?

Selenium WebDriver is an API that allows us to write automated tests for web applications. The automated tests that use Selenium WebDriver are run by using a web browser. In other words, Selenium WebDriver helps us to verify that our application is working as expected when it is used by a real user.

The key features of Selenium WebDriver are:

It supports many common programming languages such as C#, Java, JavaScript, Python, and so on.

It supports all common web browsers.

It supports headless browsers such as HtmlUnit and PhantomJS.

Get pass Function  :  getpass function is used for take password without displaying the window .

#facebook login python script.

from selenium import webdriver # selenium tool for web activtie
from getpass import getpass #To take password without displaying. user = input('Enter your username or email id: ') pwd = getpass('Enter your password : ') driver = webdriver.Chrome() driver.get("https://www.facebook.com/") username_box = driver.find_element_by_id('email') username_box.send_keys(user) password_box = driver.find_element_by_id('pass') . password_box.send_keys(pwd) login_btn = driver.find_element_by_id('u_0_2') login_btn.submit()

 



Arrays in Solidity Programming Language.

Arrays Solidity supports both generic and byte arrays. It supports both fixed size and dynamic arrays. It also supports multidimensional ...