Selenium WebDriver is a framework for browser automation that receives instructions and sends them to a browser. A popular web-based automation testing tool Selenium WebDriver mostly used for automating Web UI testing activities. It supports Browser Mozilla Firefox, Internet Explorer, Google Chrome, Safari, Opera Etc.
How to Install Selenium on Chrome Browser -
wget https://chromedriver.storage.googleapis.com/92.0.4515.107/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/chromedriver
sudo chown root: root /usr/bin/chromedriver
sudo chmod +x /usr/bin/chromedriver
8. Pycharm- Go to Settings and install Selenium inside the Python interpreter.
How to Perform Testing in selenium-
Command line -
We are using this command line to perform selenium testing
send_keys()-Inserts data into the input field through send_keys.
Click()-click is used to click any button
Locating Strategies - Locators Strategies are methods used to locate elements from the page and perform an operation on the same and attribute value matching the location will be returned. Selenium Python uses a variety of element finding techniques.
Create a project and go to the python file and add the following code:
Example of Selenium Testing-
Run Scripts-
OUTPUT -