Welcome to the selenium-practice-lesson repository! This project is designed for practical learning and hands-on exercises in UI test automation using Selenium. It’s ideal for those who want to strengthen their Selenium skills through real-world test scenarios.
- Introduction
- Installation
- Usage
- Features
- Dependencies
- Documentation
- Examples
- Troubleshooting
- Contributors
- Contributing
- License
- Open IntelliJ IDEA.
- Select File > New > Project from Version Control.
- Enter the repository URL:
https://github.com/cihat-kose/selenium-practice-lesson.git
and click Clone. - Ensure JDK is installed:
- Go to File > Project Structure > Project
- Set the Project SDK to Java 21 (or later)
- Add required dependencies manually:
- Go to File > Project Structure > Libraries
- Click the + icon and select From Maven
- Add the following artifacts:
org.seleniumhq.selenium:selenium-java:latest
commons-io:commons-io:latest
org.slf4j:slf4j-nop:latest
💡 No pom.xml
or build.gradle
is required. All dependencies are added manually through IntelliJ IDEA.
- Open the project in IntelliJ IDEA.
- Navigate to the test directories containing practice lessons.
- Run test classes or methods using IntelliJ’s test runner.
- Modify or extend test cases as needed to enhance your understanding.
- Focused practice modules on essential Selenium skills.
- Hands-on test cases covering real-world UI elements and flows.
- Easy-to-understand structure for beginners and intermediate learners.
- Java JDK 21 or newer
- Selenium WebDriver
- JUnit 5
- Commons IO
- SLF4J NOP
Each test file includes inline documentation explaining the scenario and Selenium functions being used.
- Locating Elements: Practice using ID, name, class, CSS Selector, and XPath.
- Interaction Methods: Perform clicks, typing, selections, and submissions.
- Action Class Examples: Hovering, drag-and-drop, and composite actions.
- Keyboard/Mouse Control: Using Robot class for OS-level control.
- Explicit Waits: Synchronize your tests with slow-loading elements.
- Implicit Waits: Set global wait defaults for driver operations.
- iFrames: Switch to frames and interact with inner elements.
- Window/Tab Management: Handle multiple browser tabs or pop-ups.
- File Upload: Handle file dialogs using both Selenium and Robot.
- Scrolling Techniques: Scroll into view or to the bottom of the page.
If you experience any issues:
- Make sure all
.jar
dependencies are correctly added in your IDE. - Check that your browser drivers (e.g., ChromeDriver) are up-to-date.
- Ensure that your Project SDK is set correctly in IntelliJ.
- Review test logs and console output to identify failures.
- Still stuck? Open an issue on GitHub and describe your problem in detail.
- cihat-kose – Cihat Köse
- SefaKahramann – Sefa Kahraman
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
For more info, visit the selenium-practice-lesson GitHub page.