Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update playwright-dotnet monorepo to 1.49.0 #182

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jan 1, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
Microsoft.Playwright 1.45.0 -> 1.49.0 age adoption passing confidence
Microsoft.Playwright.TestAdapter 1.45.0 -> 1.49.0 age adoption passing confidence

Test plan: CI should pass with updated dependencies. No review required: this is an automated dependency update PR.


Release Notes

microsoft/playwright-dotnet (Microsoft.Playwright)

v1.49.0

Aria snapshots

New assertion Expect(locator).toMatchAriaSnapshot() verifies page structure by comparing to an expected accessibility tree, represented as YAML.

await page.GotoAsync("https://playwright.dev");
await Expect(page.Locator("body")).ToMatchAriaSnapshotAsync(@​"
  - banner:
    - heading /Playwright enables reliable/ [level=1]
    - link ""Get started""
    - link ""Star microsoft/playwright on GitHub""
  - main:
    - img ""Browsers (Chromium, Firefox, WebKit)""
    - heading ""Any browser • Any platform • One API""
");

You can generate this assertion with Test Generator or by calling locator.ariaSnapshot().

Learn more in the aria snapshots guide.

Tracing groups

New method tracing.group() allows you to visually group actions in the trace viewer.

// All actions between GroupAsync and GroupEndAsync
// will be shown in the trace viewer as a group.
await Page.Context.Tracing.GroupAsync("Open Playwright.dev > API");
await Page.GotoAsync("https://playwright.dev/");
await Page.GetByRole(AriaRole.Link, new() { Name = "API" }).ClickAsync();
await Page.Context.Tracing.GroupEndAsync();

Breaking: chrome and msedge channels switch to new headless mode

This change affects you if you're using one of the following channels in your playwright.config.ts:

  • chrome, chrome-dev, chrome-beta, or chrome-canary
  • msedge, msedge-dev, msedge-beta, or msedge-canary

After updating to Playwright v1.49, run your test suite. If it still passes, you're good to go. If not, you will probably need to update your snapshots, and adapt some of your test code around PDF viewers and extensions. See issue #​33566 for more details.

Try new Chromium headless

You can opt into the new headless mode by using 'chromium' channel. As official Chrome documentation puts it:

New Headless on the other hand is the real Chrome browser, and is thus more authentic, reliable, and offers more features. This makes it more suitable for high-accuracy end-to-end web app testing or browser extension testing.

See issue #​33566 for the list of possible breakages you could encounter and more details on Chromium headless. Please file an issue if you see any problems after opting in.

// runsettings.xml
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <Playwright>
    <BrowserName>chromium</BrowserName>
    <LaunchOptions>
      <Channel>chromium</Channel>
    </LaunchOptions>
  </Playwright>
</RunSettings>
dotnet test -- Playwright.BrowserName=chromium Playwright.LaunchOptions.Channel=chromium

Miscellaneous

  • There will be no more updates for WebKit on Ubuntu 20.04 and Debian 11. We recommend updating your OS to a later version.
  • <canvas> elements inside a snapshot now draw a preview.

Browser Versions

  • Chromium 131.0.6778.33
  • Mozilla Firefox 132.0
  • WebKit 18.2

This version was also tested against the following stable channels:

  • Google Chrome 130
  • Microsoft Edge 130

v1.48.0

WebSocket routing

New methods Page.RouteWebSocketAsync() and BrowserContext.RouteWebSocketAsync() allow to intercept, modify and mock WebSocket connections initiated in the page. Below is a simple example that mocks WebSocket communication by responding to a "request" with a "response".

await page.RouteWebSocketAsync("/ws", ws => {
  ws.OnMessage(message => {
    if (message.Text == "request")
      ws.Send("response");
  });
});

See WebSocketRoute for more details.

UI updates

  • New "copy" buttons for annotations and test location in the HTML report.
  • Route method calls like Foute.FulfillAsync() are not shown in the report and trace viewer anymore. You can see which network requests were routed in the network tab instead.
  • New "Copy as cURL" and "Copy as fetch" buttons for requests in the network tab.

Miscellaneous

Browser Versions

  • Chromium 130.0.6723.19
  • Mozilla Firefox 130.0
  • WebKit 18.0

This version was also tested against the following stable channels:

  • Google Chrome 129
  • Microsoft Edge 129

v1.47.0

Network Tab improvements

The Network tab in the trace viewer has several nice improvements:

  • filtering by asset type and URL
  • better display of query string parameters
  • preview of font assets

Network tab now has filters

Miscellaneous

  • The mcr.microsoft.com/playwright/dotnet:v1.47.0 now serves a Playwright image based on Ubuntu 24.04 Noble.
    To use the 22.04 jammy-based image, please use mcr.microsoft.com/playwright/dotnet:v1.47.0-jammy instead.
  • The :latest/:focal/:jammy tag for Playwright Docker images is no longer being published. Pin to a specific version for better stability and reproducibility.
  • TLS client certificates can now be passed from memory by passing cert and key as byte arrays instead of file paths.
  • NoWaitAfter in locator.selectOption() was deprecated.
  • We've seen reports of WebGL in Webkit misbehaving on GitHub Actions macos-13. We recommend upgrading GitHub Actions to macos-14.

Browser Versions

  • Chromium 129.0.6668.29
  • Mozilla Firefox 130.0
  • WebKit 18.0

This version was also tested against the following stable channels:

  • Google Chrome 128
  • Microsoft Edge 128

v1.46.0

TLS Client Certificates

Playwright now allows to supply client-side certificates, so that server can verify them, as specified by TLS Client Authentication.

You can provide client certificates as a parameter of browser.NewContextAsync() and APIRequest.NewContextAsync(). The following snippet sets up a client certificate for https://example.com:

var context = await Browser.NewContextAsync(new() {
  ClientCertificates = [
    new() {
      Origin = "https://example.com",
      CertPath = "client-certificates/cert.pem",
      KeyPath = "client-certificates/key.pem",
    }
  ]
});

When using the MSTest or NUnit base-classes, these can be added by using the ContextOptions method.

Trace Viewer Updates

  • Content of text attachments is now rendered inline in the attachments pane.
  • New setting to show/hide routing actions like route.ContinueAsync().
  • Request method and status are shown in the network details tab.
  • New button to copy source file location to clipboard.
  • Metadata pane now displays the BaseURL.

Miscellaneous

Browser Versions

  • Chromium 128.0.6613.18
  • Mozilla Firefox 128.0
  • WebKit 18.0

This version was also tested against the following stable channels:

  • Google Chrome 127
  • Microsoft Edge 127

v1.45.1

Highlights

https://github.com/microsoft/playwright-java/issues/1617 - [Bug]: Trace Viewer not reporting all actionshttps://github.com/microsoft/playwright/issues/317644 - [Bug]: some actions do not appear in the trace file

Browser Versions

  • Chromium 127.0.6533.5
  • Mozilla Firefox 127.0
  • WebKit 17.4

This version was also tested against the following stable channels:

  • Google Chrome 126
  • Microsoft Edge 126

Configuration

📅 Schedule: Branch creation - "on the 1st through 7th day of the month" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the bot label Jan 1, 2025
Copy link

github-actions bot commented Jan 1, 2025

Test Results

17 tests  ±0   16 ✅ ±0   20m 58s ⏱️ -2s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 7668930. ± Comparison against base commit 35144e8.

Copy link
Author

renovate bot commented Jan 2, 2025

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (1.49.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/playwright-dotnet-monorepo branch January 2, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant