Skip to content

Add support for multi-page web tests#3065

Open
Komoszek wants to merge 14 commits into
masterfrom
feature/web-multi-tab-continued
Open

Add support for multi-page web tests#3065
Komoszek wants to merge 14 commits into
masterfrom
feature/web-multi-tab-continued

Conversation

@Komoszek
Copy link
Copy Markdown

Supersedes #2968, enhances it with getCurrentPageUrl and switchToMainPage methods

baslogic and others added 10 commits May 13, 2026 18:39
Add PageManager and 6 new Playwright actions (openNewTab, closeTab,
switchToTab, getTabs, getCurrentTab, waitForPopup) enabling interaction
with content in multiple browser tabs during web tests.

Includes TypeScript unit and integration tests, Flutter E2E tests,
documentation updates, and changelog entry.
@github-actions github-actions Bot added docs Concerns doc comments, READMEs, or docs package: patrol Related to the patrol package (native automation, test bundling) labels May 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

🚀 Preview Deployment Ready!

Preview URL: https://pr-3065-patrol-docs.vercel.app


Latest Deployment

  • Commit: 694a5dd
  • Branch: feature/web-multi-tab-continued
  • Triggered by: @Komoszek
  • Deployed at: 2026-05-13 17:00:55 UTC

This preview URL is stable and will be updated with each new commit to this PR.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces multi-tab browser support for web tests, adding methods like openNewPage, closePage, and switchToPage to the WebAutomator interface. The web runner is updated with a PageManager to handle multiple page instances, and comprehensive integration tests are included. Feedback highlights opportunities to reduce test flakiness by replacing fixed delays with explicit waits and suggests refactoring repetitive code in the native automator. Corrections were also provided for documentation syntax and type inconsistencies in contract tests.

Comment thread dev/e2e_app/patrol_test/web/web_example_multi_tab_test.dart
Comment thread docs/documentation/web.mdx Outdated
Comment thread packages/patrol/lib/src/platform/web/web_automator_native.dart
Comment thread packages/patrol/web_runner/tests/__tests__/contracts.test.ts
Comment thread packages/patrol/web_runner/tests/__tests__/contracts.test.ts Outdated
@Komoszek Komoszek marked this pull request as ready for review May 13, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Concerns doc comments, READMEs, or docs package: patrol Related to the patrol package (native automation, test bundling)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants