java/playwright examples updated#273
Open
padmavemulapati wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds three new Java Playwright example modules (basic, manual-mode, multi-page) demonstrating how to run Playwright tests with axe-core Watcher integration.
Changes:
- Added Playwright-based JUnit tests for basic login, manual analysis mode, and multi-page navigation.
- Added per-module Maven configuration (Surefire + Ant-run) intended to install Playwright browsers for test runs.
- Added placeholder
mainclasses for each module.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
java/playwright/basic/src/test/java/com/deque/watcher_examples/playwright/BasicTest.java |
Adds basic Playwright + Watcher JUnit test. |
java/playwright/basic/src/main/java/com/deque/watcher_examples/playwright/Basic.java |
Adds placeholder entrypoint class. |
java/playwright/basic/pom.xml |
Adds Playwright/JUnit/Watcher deps and browser-install plugin wiring. |
java/playwright/manual-mode/src/test/java/com/deque/watcher_examples/playwright/ManualModeTest.java |
Adds manual analysis mode Playwright + Watcher JUnit test. |
java/playwright/manual-mode/src/main/java/com/deque/watcher_examples/playwright/ManualMode.java |
Adds placeholder entrypoint class. |
java/playwright/manual-mode/pom.xml |
Adds Playwright/JUnit/Watcher deps and browser-install plugin wiring. |
java/playwright/multi-page/src/test/java/com/deque/watcher_examples/playwright/MultiPageTest.java |
Adds multi-page Playwright + Watcher JUnit tests with shared context. |
java/playwright/multi-page/src/main/java/com/deque/watcher_examples/playwright/MultiPage.java |
Adds placeholder entrypoint class. |
java/playwright/multi-page/pom.xml |
Adds Playwright/JUnit/Watcher deps and browser-install plugin wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+11
to
+16
| <properties> | ||
| <maven.compiler.source>17</maven.compiler.source> | ||
| <maven.compiler.target>17</maven.compiler.target> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <skip.browser.install>false</skip.browser.install> | ||
| </properties> |
Comment on lines
+11
to
+16
| <properties> | ||
| <maven.compiler.source>17</maven.compiler.source> | ||
| <maven.compiler.target>17</maven.compiler.target> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <skip.browser.install>false</skip.browser.install> | ||
| </properties> |
Comment on lines
+11
to
+16
| <properties> | ||
| <maven.compiler.source>17</maven.compiler.source> | ||
| <maven.compiler.target>17</maven.compiler.target> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <skip.browser.install>false</skip.browser.install> | ||
| </properties> |
Comment on lines
+49
to
+50
| // An empty user-data dir lets Playwright create a fresh temporary profile. | ||
| browserContext = playwright.chromium().launchPersistentContext(Paths.get(""), launchOptions); |
| .setArgs(List.of("--no-sandbox", "--disable-dev-shm-usage"))); | ||
|
|
||
| playwright = Playwright.create(); | ||
| browserContext = playwright.chromium().launchPersistentContext(Paths.get(""), launchOptions); |
| .setArgs(List.of("--no-sandbox", "--disable-dev-shm-usage"))); | ||
|
|
||
| playwright = Playwright.create(); | ||
| browserContext = playwright.chromium().launchPersistentContext(Paths.get(""), launchOptions); |
|
|
||
| @Nested | ||
| @DisplayName("Forgot password page") | ||
| class MultiPageForgotPasswordTest { |
| then turn on auto-analysis. | ||
| We click the button, | ||
| causing an auto-analysis (+1), | ||
| then assure the element appears. |
Garbee
reviewed
Jun 22, 2026
|
|
||
| jobs: | ||
| semantic-pr-footer: | ||
| if: ${{ github.event.pull_request.body != '' }} |
Member
There was a problem hiding this comment.
This should not be touched in a PR like this. All PRs should have descriptions.
Garbee
added a commit
that referenced
this pull request
Jun 23, 2026
Bring over the multi-page test from #273 as a fourth Playwright Java example: one wrapped page reused across the home, login, and forgot-password pages, with assertions grouped by page via @nested and a flush after each test. Adapt the setup to match the other Java/Playwright examples (env-var credentials, CHROME_BIN channel selection, debug logger) and wait for the link list before count() so the assertion is not raced. Wire the example into the java-smoke-tests matrix and the README table. Co-authored-by: Jonathan Garbee <jonathan.garbee@deque.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.