This project automates the extraction of country-wise population data from the Worldometers website using Selenium WebDriver. The script captures key statistics, such as population, density, and urban population percentage and displays them in a tabular format in the console.
- Automated Web Navigation: Accesses the Worldometers Population by Country page programmatically.
- Dynamic Table Parsing: Extracts data dynamically from an HTML table using Selenium.
- Data Columns Extracted:
- Rank (No)
- Country
- Population
- Yearly Change
- Net Change
- Density
- Land Area
- Migrants
- Fertility Rate
- Median Age
- Urban Population (%)
- World Share
- Formatted Console Output: Displays the extracted data in a neatly formatted table in the console.
- Smooth Scrolling: Uses JavaScript Executor to scroll through the page for visibility of dynamic content.
Ensure the following are set up on your system:
- Java Development Kit (JDK) - Version 8 or above.
- Selenium WebDriver - Include the required Selenium libraries in your project.
- Google Chrome - Latest stable version.
- ChromeDriver - Ensure the ChromeDriver version matches your browser version.
- Integrated Development Environment (IDE) - Any IDE like IntelliJ IDEA or Eclipse for running Java programs.
- Java - The programming language used for the project.
- Selenium WebDriver - For web automation and data extraction.
- Google Chrome & ChromeDriver - To simulate browser-based interaction.
- JavaScript Executor - For smooth scrolling through the web page.