Skip to content

fix(web-integration): auto switch to new tab when forceSameTabNavigat…#2149

Open
zichen0116 wants to merge 8 commits into
web-infra-dev:mainfrom
zichen0116:fix/auto-switch-new-tab
Open

fix(web-integration): auto switch to new tab when forceSameTabNavigat…#2149
zichen0116 wants to merge 8 commits into
web-infra-dev:mainfrom
zichen0116:fix/auto-switch-new-tab

Conversation

@zichen0116

@zichen0116 zichen0116 commented Mar 15, 2026

Copy link
Copy Markdown

Summary

  • When forceSameTabNavigation: false, the agent now automatically detects
    newly opened tabs (via popup event) and switches its page reference to
    the new tab, so subsequent AI actions operate on it.
  • Default behavior (forceSameTabNavigation: true) is unchanged.
  • Updated existing test to reflect the new semantics.

Closes #2098

@quanru quanru force-pushed the fix/auto-switch-new-tab branch 6 times, most recently from 80dd6e5 to 59a05ea Compare June 10, 2026 09:59
@hellolovebuxiu

Copy link
Copy Markdown

期待这个功能

@quanru quanru force-pushed the fix/auto-switch-new-tab branch from 6c6fa98 to d26cf55 Compare June 22, 2026 07:48
# Conflicts:
#	apps/site/docs/en/integrate-with-playwright.mdx
#	apps/site/docs/en/integrate-with-puppeteer.mdx
#	apps/site/docs/zh/integrate-with-playwright.mdx
#	apps/site/docs/zh/integrate-with-puppeteer.mdx
#	packages/web-integration/src/playwright/index.ts
#	packages/web-integration/src/puppeteer/index.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot switch to the newly opened tab

3 participants