microsoft/playwright-dotnet (Microsoft.Playwright)
### [`v1.40.0`](https://togithub.com/microsoft/playwright-dotnet/releases/tag/v1.40.0)
#### Test Generator Update
![Playwright Test Generator](https://togithub.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190)
New tools to generate assertions:
- "Assert visibility" tool generates [Expect(locator).ToBeVisibleAsync(\[options\])](https://playwright.dev/dotnet/docs/api/class-locatorassertions#locator-assertions-to-be-visible).
- "Assert value" tool generates [Expect(locator).ToHaveValueAsync(value\[, options\])](https://playwright.dev/dotnet/docs/api/class-locatorassertions#locator-assertions-to-have-value).
- "Assert text" tool generates [Expect(locator).ToContainTextAsync(expected)](https://playwright.dev/dotnet/docs/api/class-locatorassertions#locator-assertions-to-contain-text).
Here is an example of a generated test with assertions:
```csharp
await Page.GotoAsync("https://playwright.dev/");
await Page.GetByRole(AriaRole.Link, new() { Name = "Get started" }).ClickAsync();
await Expect(Page.GetByLabel("Breadcrumbs").GetByRole(AriaRole.List)).ToContainTextAsync("Installation");
await Expect(Page.GetByLabel("Search")).ToBeVisibleAsync();
await Page.GetByLabel("Search").ClickAsync();
await Page.GetByPlaceholder("Search docs").FillAsync("locator");
await Expect(Page.GetByPlaceholder("Search docs")).ToHaveValueAsync("locator");
```
#### New APIs
- Option `Reason` in [Page.CloseAsync(\[options\])](https://playwright.dev/dotnet/docs/api/class-page#page-close), [BrowserContext.CloseAsync(\[options\])](https://playwright.dev/dotnet/docs/api/class-browsercontext#browser-context-close) and [Browser.CloseAsync(\[options\])](https://playwright.dev/dotnet/docs/api/class-browser#browser-close). Close reason is reported for all operations interrupted by the closure.
- Option `FirefoxUserPrefs` in [browserType.launchPersistentContext(userDataDir\[, options\])](https://playwright.dev/dotnet/docs/api/class-browsertype#browser-type-launch-persistent-context).
#### Other Changes
- Methods [download.PathAsync()](https://playwright.dev/dotnet/docs/api/class-download#download-path) throw an error for failed and cancelled downloads.
- Playwright [docker image](https://playwright.dev/dotnet/docs/docker) now comes with .NET 8 (new LTS).
#### Browser Versions
- Chromium 120.0.6099.28
- Mozilla Firefox 119.0
- WebKit 17.4
This version was also tested against the following stable channels:
- Google Chrome 119
- Microsoft Edge 119
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
1.39.0
->1.40.0
Release Notes
microsoft/playwright-dotnet (Microsoft.Playwright)
### [`v1.40.0`](https://togithub.com/microsoft/playwright-dotnet/releases/tag/v1.40.0) #### Test Generator Update ![Playwright Test Generator](https://togithub.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190) New tools to generate assertions: - "Assert visibility" tool generates [Expect(locator).ToBeVisibleAsync(\[options\])](https://playwright.dev/dotnet/docs/api/class-locatorassertions#locator-assertions-to-be-visible). - "Assert value" tool generates [Expect(locator).ToHaveValueAsync(value\[, options\])](https://playwright.dev/dotnet/docs/api/class-locatorassertions#locator-assertions-to-have-value). - "Assert text" tool generates [Expect(locator).ToContainTextAsync(expected)](https://playwright.dev/dotnet/docs/api/class-locatorassertions#locator-assertions-to-contain-text). Here is an example of a generated test with assertions: ```csharp await Page.GotoAsync("https://playwright.dev/"); await Page.GetByRole(AriaRole.Link, new() { Name = "Get started" }).ClickAsync(); await Expect(Page.GetByLabel("Breadcrumbs").GetByRole(AriaRole.List)).ToContainTextAsync("Installation"); await Expect(Page.GetByLabel("Search")).ToBeVisibleAsync(); await Page.GetByLabel("Search").ClickAsync(); await Page.GetByPlaceholder("Search docs").FillAsync("locator"); await Expect(Page.GetByPlaceholder("Search docs")).ToHaveValueAsync("locator"); ``` #### New APIs - Option `Reason` in [Page.CloseAsync(\[options\])](https://playwright.dev/dotnet/docs/api/class-page#page-close), [BrowserContext.CloseAsync(\[options\])](https://playwright.dev/dotnet/docs/api/class-browsercontext#browser-context-close) and [Browser.CloseAsync(\[options\])](https://playwright.dev/dotnet/docs/api/class-browser#browser-close). Close reason is reported for all operations interrupted by the closure. - Option `FirefoxUserPrefs` in [browserType.launchPersistentContext(userDataDir\[, options\])](https://playwright.dev/dotnet/docs/api/class-browsertype#browser-type-launch-persistent-context). #### Other Changes - Methods [download.PathAsync()](https://playwright.dev/dotnet/docs/api/class-download#download-path) throw an error for failed and cancelled downloads. - Playwright [docker image](https://playwright.dev/dotnet/docs/docker) now comes with .NET 8 (new LTS). #### Browser Versions - Chromium 120.0.6099.28 - Mozilla Firefox 119.0 - WebKit 17.4 This version was also tested against the following stable channels: - Google Chrome 119 - Microsoft Edge 119Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.