Automation is the use of software to create repeatable instructions and processes to replace or reduce human interaction with IT systems.
“Automation gives the administrator tools to effectively deploy scalable workloads, without a commensurate increase in staff,” says Ned Bellavance.
What is Selenium?
Selenium is an umbrella project for a range of tools and libraries that enable and support the automation of web browsers. Selenium is also the open-source test automation framework, tests the web-browsers and operating system. Selenium offers compatibility with multiple programming languages such as Java, Python, C#, and more, allowing testers to automate their website testing in any programming language.
Use the following command lines in the terminal of the Linux.
sudo apt-get update
sudo apt-get upgrade
sudo apt install python3
pip3 install selenium
pip3 install driver-manager
python3 -m pip3 install –upgrade pip
Facebook-automation using selenium to log in.
step1. Create a python file with main.py
step2. Do the following programming from python
from selenium import webdriver
from selenium.webdriver import Chrome
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
####link the log_in file where we keep the username and password
####by creating a variable due to security proposes
from log_in import username
from log_in import password
driver = webdriver.Chrome(ChromeDriverManager().install())
email_input = driver.find_element_by_xpath(“//*[@id=’email’]”)
#automatic types the username that you have created in log_in file
password_input = driver.find_element_by_xpath(“//*[@id=’pass’]”)
#automatic types the password from the file called log_in
login_button = driver.find_element_by_xpath(“//*[@id=’loginbutton’]”)
#hits enter on login button then and gets the loged in to facebook. programme:-
you may also like Web automation in Python script using Selenium in Linux
Read about the Latest News, Nepal Reviews, Gadgets, How-to, Lifestyle, Entertainment, Lyrics, etc. on the All Info Nepal website, and don’t forget to follow us on Facebook, Twitter, Instagram, Linkedin.