Skip to content

fix(test-adapter): run settings parsing, launch options copy, launch options for remote browsers - #3455

Merged
Pavel Feldman (pavelfeldman) merged 3 commits into
microsoft:mainfrom
dgozman:fix-3431
Nov 10, 2026
Merged

Pavel Feldman (pavelfeldman) merged 3 commits into
microsoft:mainfrom
dgozman:fix-3431

Conversation

@dgozman

@dgozman Dmitry Gozman (dgozman) commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Run settings: a JSON value keeps the apostrophes in its strings, an unsupported element is skipped whole, and an enum value is accepted by its C# name in any case.
  • PlaywrightSettingsXml.Retries was read by nothing and is removed, with a compatibility suppression. PlaywrightSettingsXml.Headless was never read from the run settings and is now obsolete in favor of LaunchOptions.Headless.
  • PlaywrightSettingsProvider.LaunchOptions returns a copy, so a test class that changes the options it got does not change them for the next one.
  • When connecting to a server, the x-playwright-launch-options header carries the LaunchOptionsAsync() result of the test class, and a header that the class set itself is kept instead of throwing.

Fixes #3425
Fixes #3424
Fixes #3431

- A JSON value keeps the apostrophes in its strings. The shorthand with single
  quotes still works.
- An element that is not supported is skipped whole, so its children are not
  read as settings.
- An enum value is accepted by its C# name in any case, next to the documented value.
- PlaywrightSettingsXml.Retries was read by nothing and is removed.
  PlaywrightSettingsXml.Headless was never read from the run settings and is
  obsolete in favor of LaunchOptions.Headless.

References: microsoft#3431
PlaywrightSettingsProvider.LaunchOptions returned the object parsed from the
run settings, so a test class that changed the options it got changed them
for every later caller. HEADED=1 was written into that object as well.

Fixes: microsoft#3425
… a remote browser

The x-playwright-launch-options header was built from the run settings only,
so a LaunchOptionsAsync override was dropped when connecting to a server. A
test class that set the header itself in ConnectOptionsAsync got an
ArgumentException for the duplicate key; its header is now kept.

Fixes: microsoft#3424
@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit be92216 into microsoft:main Nov 10, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants