Skip to content

Releases: microsoft/playwright-dotnet

v0.191.0

26 Feb 13:23
7510e7f
Compare
Choose a tag to compare

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

v0.180.0

22 Jan 13:24
5d0d2ab
Compare
Choose a tag to compare

Driver Update

Driver updated to v.1.8.0. These are the outstanding changes:

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 in ElementHandle.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 to ExtraHTTPHeaders.
  • SetExtraHttpHeadersAsync method was renamed to SetExtraHTTPHeadersAsync.
  • firefoxUserPrefs was removed from launch persistent options.

Changelog

  • 1f29b09 fix ignore all default arguments.
  • ae6b879 fix ignoreDefaultArgs serialization.

v0.170.2

21 Dec 13:05
88a62f3
Compare
Choose a tag to compare

Changelog

  • 5dfec1e Fixed builds on Windows projects using packages.config
  • 88a62f3 Fixed Env property serialization.

v0.170.1

17 Dec 15:47
e8e5703
Compare
Choose a tag to compare

Fix deployed assembly references

v0.170.0

17 Dec 14:28
d4b8f14
Compare
Choose a tag to compare

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 and Browser.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 the content argument was renamed to script.
  • a388277 If you use AddStyleTagAsync with named arguments the content argument was renamed to style.

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

04 Dec 11:37
5b0ad49
Compare
Choose a tag to compare

Changelog

Add copy targets for Xamarin.Mac

v0.162.0

27 Nov 15:05
92d8b94
Compare
Choose a tag to compare

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 to WaitForEventAsync.
  • ee860a8 Request.GetPostDataJsonAsync was renamed to Request.GetPostDataJson.

Changelog

  • b32e6e0 Made ResourceType more flexible.
  • 07727ac Fix actionability spelling.
  • 3182d5f Remove InstallAsync from docs.

v0.152.0

28 Oct 13:08
708a23d
Compare
Choose a tag to compare

Changelog

v0.151.0

20 Oct 13:09
afacf03
Compare
Choose a tag to compare

New Features

Video screencasts API is now stable: Use the videosPath option while creating browser contexts to record videos for all pages within the context.

// With browser.NewContextAsync()
var context = await browser.NewContextAsync(videosPath: "videos/");

// With browser.NewPageAsync()
var page = await browser.NewPageAsync(videosPath: "videos/");

// [Optional] Specify video size; defaults to viewport size
var context = await browser.NewContextAsync(
    videosPath: "videos/",
    videoSize: new ViewportSize { Width = 800, Height = 600 }
);

New APIs

  • Browser.NewPageAsync(), Browser.NewContextAsync() and BrowserType.LaunchPersistentContextAsync() now support videosPath and videoSize option.
  • New Page.Video property.
  • New Video class
  • New BrowserContext.Browser property.
  • Both BrowserContext.ExposeBindingAsync() and Page.ExposeBindingAsync() now accept a Func<BindingSource, IJSHandle, TResult> to received IJSHandle instead of of serialized values.

Changelog

  • Driver updated to v0.151.0. See v0.150.0 and v0.151.0 changelogs.
  • Connection won't timeout pending tasks.

v0.142.2

10 Oct 17:30
708a02f
Compare
Choose a tag to compare

Changelog

  • Fix the PaperFormat used by Page.GetPdfAsync. The driver expects a string instead of an object.