All skills
fugazi avatar

/webapp-selenium-testing

@ef704d5

Author and maintain versioned Selenium WebDriver tests with Java and JUnit 5. Use for creating, debugging, or running Selenium specs, implementing Page Objects, handling explicit waits, capturing screenshots, or setting up Maven test projects. Supports Chrome, Firefox, and Edge. Keywords: Selenium WebDriver, Java, JUnit 5, Page Object Model, explicit waits, Maven, screenshots.

Use this Skill: https://skilld.dev/gh/fugazi/test-automation-skills-agents/webapp-selenium-testing

This session only. Nothing lands on disk.

referencespage-object-model-basics.md

≈559 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Page Object Model Basics

Part of the webapp-selenium-testing skill. See SKILL.md for full context.

Related: this file was split from the original page-object-model.md. See the other related files in this folder.

Comprehensive guide for implementing the Page Object Model pattern in Selenium tests with Java.

What is Page Object Model?

Page Object Model (POM) is a design pattern that creates an abstraction layer between test code and page implementation. Each page (or component) in your application gets its own class that encapsulates:

  • Locators for elements on the page
  • Methods for interactions and actions
  • Fluent interface for method chaining

Benefits

Benefit Description
Maintainability Change locator once, not in every test
Readability Tests read like user stories
Reusability Share page logic across tests
Separation Test logic separate from implementation
Scalability Easy to add new pages/components

Directory Structure (Maven)

src/
├── main/java/com/project/
│   ├── base/
│   │   ├── BasePage.java           # Common page functionality
│   │   └── BaseComponent.java      # Reusable UI components
│   ├── pages/
│   │   ├── LoginPage.java
│   │   ├── DashboardPage.java
│   │   └── ProductPage.java
│   ├── components/
│   │   ├── HeaderComponent.java
│   │   ├── FooterComponent.java
│   │   └── ModalComponent.java
│   ├── factories/
│   │   └── WebDriverFactory.java
│   ├── models/
│   │   └── User.java               # Data models with Lombok
│   └── utils/
│       ├── ConfigReader.java
│       └── WaitUtils.java
├── main/resources/
│   └── config.properties
└── test/java/com/project/
    ├── base/
    │   └── BaseTest.java           # Test setup/teardown
    └── tests/
        ├── LoginTest.java
        └── DashboardTest.java

Source: SKILL.md on GitHub

1 warning13d4 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The skill provides templates and scripts for Selenium WebDriver testing in Java. It is categorized as low risk due to potential indirect prompt injection vulnerabilities inherent in browser automation and the use of JavaScript execution in the browser context.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • Runlayer6mo

    1/6 files flagged

Signed by skilld at ef704d5. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 2 months ago

README badge

README badge for fugazi/test-automation-skills-agents/webapp-selenium-testing