playwright-java
Skill by sickn33
Scaffolds and writes Playwright E2E tests in Java using Page Object Model, JUnit 5, Allure reporting and parallel execution. It is for Java developers who want structured browser test suites.
Install playwright-java
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/playwright-java ~/.claude/skills/playwright-javaRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agentic-awesome-skills/skills/playwright-java ~/.gemini/antigravity-cli/skills/playwright-javaAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant Playwright Java test patterns for end-to-end testing. It covers scaffolding a new project, building Page Object Model classes with strict locator strategies, and writing JUnit 5 test classes with Allure annotations. It also covers parallel execution with ThreadLocal ownership, tracing, and CI setup with GitHub Actions.
The skill targets Java 17 or later and Playwright 1.44 or later. It includes base test and base page class templates, plus reference files for configuration, assertions and fixtures. It is aimed at developers who need enterprise-grade browser tests in Java, and it asks users to run tests only against authorized origins with disposable test data.
Written from the project's SKILL.md and checked against it.
What it can do
- Project scaffoldSets up a Playwright Java project layout with base classes, utilities and a pom.xml.
- Page Object classesWrites page classes that declare locators as fields and return the next page object from navigation methods.
- JUnit 5 testsWrites test classes with Allure severity and display name annotations, soft assertions and parameterized tests.
- API and UI hybrid testsCombines API requests through APIRequestContext with UI assertions in one test.
- Network mockingShows how to fulfill routed API calls with a custom status and body to test failure handling.
- Parallel executionProvides a junit-platform.properties example and ThreadLocal patterns so each test owns its own Page.
- Cross-browser runsDescribes running separate Maven jobs per browser using a browser system property.
- Tracing and reportsCovers starting and stopping traces around tests and collecting Allure results.
- CI pipeline exampleIncludes a GitHub Actions workflow that installs browsers, runs tests and uploads traces and Allure results.
What you need
- Java 17 or later
- Playwright 1.44 or later
- Maven
- JUnit 5
- Allure with the AspectJ agent for reports
Try asking
- Scaffold a new Playwright Java project with the Page Object Model
- Write a JUnit 5 login test with Allure annotations
- Make my Playwright Java tests run in parallel with ThreadLocal
Good to know
- Pinned versions in the configuration are historical examples; match your own Java, browser and Docker versions.
- Run only against authorized origins with disposable accounts, since actions can charge, message or delete records.
- Storage-state files contain credentials, and traces, screenshots and videos can contain personal data.
- The patterns require project-specific compilation and execution.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/playwright-java/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
BasePage.java5 KB -
BaseTest.java5 KB -
SKILL.md13 KB -
assertions.md4 KB -
config.md7 KB
Show all 7 files
-
fixtures.md8 KB -
page-objects.md6 KB
Alternatives to playwright-java
All alternatives →Antigravity Workflows guides an assistant through multi-skill workflows for shipping a SaaS MVP, auditing web app security, building AI agents, running browser QA, and designing a domain model. It is for users who want several skills combined with verified checkpoints.
Guides building end-to-end test suites with Playwright and Cypress. It is for developers who write E2E tests, debug flaky tests, or set testing standards.
Upgrades Chrome or Firefox versions in the Flutter Web Engine and Framework tests. It verifies the version, updates config files, syncs CI builder JSON and runs local tests before the CIPD upload.
Builds reliable browser checks for real web workflows using semantic locators, bounded waits, isolated test data and explicit outcome checks. It is for developers and testers writing or debugging browser tests.
Diagnoses memory leaks in the Qwen Code CLI using heap snapshots and the chrome-devtools CLI. Built for developers investigating high memory use, unbounded growth, or object retention.
Guides an assistant through using Claude in Chrome, a browser extension whose tools act in the person's real Chrome with their own sign-ins. It is for users who want the assistant to work in their browser safely.
Compare with antigravity-workflows, e2e-testing-patterns or upgrade-browser
playwright-java: common questions
Which Java and Playwright versions does it target?
The skill targets Java 17+ and Playwright 1.44+. The source notes that pinned versions in its configuration are historical examples.
How does it handle parallel tests?
It uses ThreadLocal so each test creates its own Playwright, Browser, BrowserContext and Page chain. It also gives a junit-platform.properties example for concurrent execution with a fixed parallelism of 4.
Does it cover CI and reporting?
Yes. It includes a GitHub Actions example that installs browsers, runs tests per browser, and uploads traces on failure and Allure results.
How do I install playwright-java?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is playwright-java free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is playwright-java safe to use?
It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to playwright-java?
Similar skills: antigravity-workflows, e2e-testing-patterns, upgrade-browser, browser-automation.
