Selenium WebDriver + Java 21 + Maven + TestNG project using the Page Object Model (POM) for public storefront checks on Oipolloi.com
The suite contains 16 UI tests covering:
- Homepage loads and has a meaningful title.
- Brand/logo link is visible and navigates home.
- Free standard global shipping announcement is visible.
- Shop navigation/dropdown is present and usable.
- Clothing navigation from the Shop menu.
- Footwear navigation from the Shop menu.
- Accessories navigation from the Shop menu.
- Brands navigation/dropdown and brand directory link.
- Search control opens and is visible.
- Search submits a product keyword and displays results.
- Cart control opens the cart view/drawer.
- Latest collection navigation.
- Product cards are visible in the latest collection.
- Story/Deck~Out navigation is available.
- Latest collection shows product pricing.
- Latest collection main content and product links are available.
The live storefront is a third-party site and can change its theme, content, or navigation. Locators are centralized in page objects. If Oi Polloi updates its Shopify theme, update the corresponding page-object locator rather than changing test assertions.
- JDK 21
- Apache Maven 3.9.9 or newer (Maven 3.9.x recommended)
- Google Chrome installed for local execution
- Internet access
Selenium Manager (bundled with Selenium 4) resolves the matching browser driver automatically. No separate ChromeDriver download or WebDriverManager dependency is required.
Run headed Chrome locally:
mvn clean testRun headless Chrome:
mvn clean test -PciOverride browser, URL, headless mode, or explicit wait timeout:
mvn clean test -Pci -Dbrowser=chrome -DbaseUrl=https://oipolloi.com -Dheadless=true -DtimeoutSeconds=20Supported browser values in this starter: chrome and firefox.
Run a specific TestNG group:
mvn clean test -Pci -Dgroups=smokeRun a single test class:
mvn clean test -Pci -Dtest=NavigationTestsoipolloi-selenium-java/
├── .github/workflows/ui-tests.yml
├── src/
│ ├── main/java/com/oipolloi/automation/
│ │ ├── config/Config.java
│ │ ├── driver/DriverFactory.java
│ │ └── pages/
│ │ ├── BasePage.java
│ │ ├── HomePage.java
│ │ ├── CollectionPage.java
│ │ └── SearchPage.java
│ └── test/
│ ├── java/com/oipolloi/automation/tests/
│ │ ├── BaseTest.java
│ │ ├── HomePageTests.java
│ │ ├── NavigationTests.java
│ │ ├── SearchTests.java
│ │ └── ShoppingExperienceTests.java
│ └── resources/testng.xml
└── pom.xml
- POM: All selectors and browser interactions are in page objects. Test classes contain TestNG assertions.
- Explicit waits: Uses
WebDriverWaitand Selenium expected conditions; no fixed sleeps. - Thread-safe drivers:
ThreadLocal<WebDriver>supports TestNG parallel methods. - Isolation: Each test gets a fresh browser session.
- Selenium Manager: Avoids pinned, stale driver binaries.
- No real transactions: Tests do not place orders or submit payment.
- Resilient navigation: Tests assert destination URL/content rather than relying on exact page titles where the storefront title may change.
- Diagnostics: Failed tests capture a screenshot under
target/failure-screenshots/.
This project performs read-only storefront navigation and search. Search results and collection inventory can vary by location, time, availability, cookies, and A/B experiments. The suite intentionally avoids customer account creation, cart mutations that may persist, and checkout/payment actions.
The homepage's observed navigation includes Shop All/Latest, Clothing, Footwear, Accessories, Brands, Search, Cart, and Deck~Out. See the current live site before adjusting any selectors.
GitHub Actions runs headless Chrome on pushes, pull requests, and manual dispatch. Maven dependencies are cached. Test reports and failure screenshots are uploaded even when a test fails.
Add this project to a GitHub repository and push the files to enable the workflow.