This project demonstrates how to automate a Google search using Selenium WebDriver in Python. The script opens Google, performs a search for a specific query, waits for the search results to load, and prints the titles of the search results.
In this project, I learned how to use Selenium WebDriver to automate web tasks. I gained experience with:
- Initializing and configuring the WebDriver.
- Interacting with web elements using different locators.
- Implementing waits to handle dynamic web content.
- Extracting and printing information from web pages.
selenium.demo.mp4
The GoogleSearchTest project automates the following tasks:
- Opens the Google homepage.
- Searches for "Automation Step By Step".
- Waits for the search results page to load.
- Prints the titles of the search results.
- Closes the browser.
- Python
- Selenium WebDriver
Before running this project, you need to have the following installed:
- Python (version 3.6 or higher)
- Chrome browser
- ChromeDriver (compatible with your Chrome browser version)
- Selenium (install via pip)
- Clone the repository:
git clone [https://github.com/ejmoore99/SeleniumTestProject1] cd GoogleSearchTest - Install the required Python packages:
pip install selenium- Download ChromeDriver:
Download the ChromeDriver that matches your Chrome browser version from here. Extract the downloaded file and place it in a directory of your choice. Update the path to the ChromeDriver in the script if necessary.
cd GoogleSearchTestpython google_search_test.py