Releases: microsoft/playwright-dotnet
v0.191.2
v0.191.1
v0.191.0
Driver Update
Driver updated to v.1.9.1, (see also v.1.9.0). These are the outstanding changes:
- New
has-text
pseudo-class for CSS selectors.:has-text("example")
matches any element containing "example" somewhere inside a child or a descendant element. There are more examples available. - Introduces
Page.PauseAsync()
, which is not yet supported in PlaywrightSharp. - Page dialogs are now auto-dismissed during execution, unless a listener for dialog event is configured. Learn more about this.
Changelog
- The driver deployment was changed to support the new driver structure. We moved from architecture-specific folder to build targets.
- Fix Mobile Geolocation snippet.
- Don't fail on possible invalid script.
- Our primary branch is now called
main
v0.180.0
Driver Update
Driver updated to v.1.8.0. These are the outstanding changes:
- Selecting elements based on layout with
:left-of()
,:right-of()
,:above()
and:below()
SelectOptionAsync
now waits for the options to be present
New APIs
ElementHandle.IsCheckedAsync()
ElementHandle.IsDisabledAsync()
ElementHandle.IsEditableAsync()
ElementHandle.IsEnabledAsync()
ElementHandle.IsHiddenAsync()
ElementHandle.IsVisibleAsync()
Page.IsCheckedAsync(selector, timeout)
Page.IsDisabledAsync(selector, timeout)
Page.IsEditableAsync(selector, timeout)
Page.IsEnabledAsync(selector, timeout)
Page.IsHiddenAsync(selector, timeout)
Page.IsVisibleAsync(selector, timeout)
- New enum item
Editable
inElementHandle.WaitForElementStateAsync.
Breaking Changes
We are still tweaking the API so we can offer the same experience across all bindings. These are the changes we had to make in this release:
ExtraHttpHeaders
properties were renamed toExtraHTTPHeaders
.SetExtraHttpHeadersAsync
method was renamed toSetExtraHTTPHeadersAsync
.firefoxUserPrefs
was removed from launch persistent options.
Changelog
v0.170.2
v0.170.1
v0.170.0
Driver update
Driver updated to v.0.170.0. See playwright changelog v1.7.0.
New APIs
- New method
BrowserContext.GetStorageStateAsync()
to get current state for later reuse. - New options where added to
Browser.NewContextAsync
andBrowser.NewPageAsync
.- proxy: Network proxy settings to use with this context.
- storageState: Populates context with given storage state.
- storageStatePath: Loads a storage state from a JSON file.
Possible breaking changes
- a388277 If you use
AddScriptTagAsync
with named arguments thecontent
argument was renamed toscript
. - a388277 If you use
AddStyleTagAsync
with named arguments thecontent
argument was renamed tostyle
.
Changelog
- 4487dee Fixed Response.Ok. It should return true if the HttpStatusCode is between 200 and 299.
- 857d919 Improved error message if browsers are missing.
- e45ef99 Added close reason in transport exceptions.
- 5b0ad49 Improved driver deploy on Xamarin.Mac apps.
- c8425a9 Improved driver deploy on Mono.
- 3d04eaa Fixed WebSocketEventArgs.WebSocket visibility.
- 8fa18ee Fixed ChromiumBrowserType overloads.
v0.162.1
v0.162.0
Major Changes
Driver updated to v.0.162.1. See playwright changelog: v1.6.0, v1.6.1 and v1.6.2.
Driver and browser install refactor.
Playwright Driver
Playwright drivers will be copied to the bin
folder at build time. Nuget will rely on the RuntimeIdentifier to copy a platform-specific driver, or on the runtime used on dotnet publish.
If the RuntimeIdentifier is not set, all runtimes will be copied inside a runtimes folder. Then, the platform-specific driver will be picked at run-time.
Browsers
The way browsers are installed will vary depending on the use case scenario.
Playwright in test projects
If you use Playwright in test projects, all required browsers will be installed at build time.
Using Playwright in Docker
If you use the official Docker images, all the required browsers will be installed in that image.
The minor version of the package will tell you which docker image tag to use. For instance, PlaywrightSharp 0.162.0 will work with the tag v1.6.2.
Using Playwright in a Remote Server.
If you run Playwright in a remote server. For instance, as part of a web application, you will need to run .\bin\playwright-cli.exe install
in Windows or ./bin/playwright-cli install
in OSX/Linux as part of your deploy script.
New APIs
- 4679039
BrowserContextOptions
was implemented to receive a DeviceDescription in the constructor. - e6aee6c New Request.Timing.
- c5a86d6 New
recordVideo
argument in BrowserContext creation. - c5a86d6 New
recordHAR
argument in BrowserContext creation. - 93cb3f4 Use Page.Websocket event and the new WebSocket class to inspect WebSocket connections.
- c9ab521 Introduce TapAsync.
await using var context = await _browser.NewContextAsync(new BrowserContextOptions(Playwright.Devices["iPhone 6"])
{
TimezoneId = "America/Jamaica",
Locale = "fr-CH",
UserAgent = "UA",
});
Breaking Changes
- c1809ae
WaitForEvent
methods were renamed toWaitForEventAsync
. - ee860a8 Request.GetPostDataJsonAsync was renamed to Request.GetPostDataJson.