-
Notifications
You must be signed in to change notification settings - Fork 245
Open
Description
Bug Description
After using tab-select to switch tabs, the snapshot command outputs incorrect Page URL and Page Title information.
Steps to Reproduce
- Open browser with multiple tabs (e.g., click a link that opens in new tab)
- List tabs and switch to a different tab:
playwright-cli tab-list
# Output: 0: [Page1], 1: [Page2]
playwright-cli tab-select 1
# Output shows tab 1 as (current)- Take snapshot:
playwright-cli snapshotExpected Behavior
The snapshot command should display the correct Page URL and Page Title of the newly selected tab (tab 1).
Actual Behavior
### Page
- Page URL: https://page1-url.com (WRONG - shows old tab URL)
- Page Title: Page 1 Title (WRONG - shows old tab title)
However, when reading the generated .yml snapshot file, it contains the correct page elements from the new tab (tab 1).
Root Cause Analysis
tab-selectdoes correctly switch the active page - actual operations (click, fill) work on the new tabtab-listcorrectly shows the switched tab ascurrent- Only the metadata output (Page URL/Title) in the
snapshotcommand is stale/wrong
Workaround
To verify actual page content after tab-select, must read the generated .yml file instead of trusting the snapshot command output.
Environment
- playwright-cli version: latest
- OS: Windows
Impact
This is confusing for users and makes debugging difficult when working with multiple tabs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels