Skip to content

Releases: microsoft/playwright-dotnet

v1.15.4

05 Oct 20:43
9d3c3d3
Compare
Choose a tag to compare

Highlights

This patch includes bug fixes for the following issues:

microsoft/playwright#9261 - [BUG] npm init playwright fails on path spaces
microsoft/playwright#9298 - [Question]: Should new Headers methods work in RouteAsync ?

Browser Versions

  • Chromium 96.0.4641.0
  • Mozilla Firefox 92.0
  • WebKit 15.0

This version of Playwright was also tested against the following stable channels:

  • Google Chrome 93
  • Microsoft Edge 93

(driver version: 1.15.2-1633455481000)

v1.15.2

01 Oct 12:25
b5e2f88
Compare
Choose a tag to compare

Highlights

This patch includes bug fixes for the following issues:

microsoft/playwright#9065 - [BUG] browser(webkit): disable COOP support
microsoft/playwright#9092 - [BUG] browser(webkit): fix text padding

Browser Versions

  • Chromium 96.0.4641.0
  • Mozilla Firefox 92.0
  • WebKit 15.0

This version of Playwright was also tested against the following stable channels:

  • Google Chrome 93
  • Microsoft Edge 93

(driver version: 1.15.0-1633020276000)

v1.15.1

30 Sep 21:44
2ca76c8
Compare
Choose a tag to compare

Highlights

This patch includes bug fixes for the following issues:

microsoft/playwright#8955 - [BUG] fix(inspector): stop on all snapshottable actions
microsoft/playwright#8999 - [BUG] fix: do not dedup header values
microsoft/playwright#9038 - [BUG] fix: restore support for slowmo connect option

Browser Versions

  • Chromium 96.0.4641.0
  • Mozilla Firefox 92.0
  • WebKit 15.0

This version of Playwright was also tested against the following stable channels:

  • Google Chrome 93
  • Microsoft Edge 93

v1.15.0

27 Sep 23:48
Compare
Choose a tag to compare

🖱️ Mouse Wheel

By using Page.Mouse.WheelAsync you are now able to scroll vertically or horizontally.

📜 New Headers API

Previously it was not possible to get multiple header values of a response. This is now possible and additional helper functions are available:

🌈 Forced-Colors emulation

Its now possible to emulate the forced-colors CSS media feature by passing it in the context options or calling Page.EmulateMediaAsync().

New APIs

Browser Versions

  • Chromium 96.0.4641.0
  • Mozilla Firefox 92.0
  • WebKit 15.0

Important ⚠

  • ⬆ .NET Core Apps 2.1 are no longer supported for our CLI tooling. As of August 31st, 2021, .NET Core 2.1 is no longer supported and will not receive any security updates. We've decided to move the CLI forward and require .NET Core 3.1 as a minimum.

This version of Playwright was also tested against the following stable channels:

  • Google Chrome 93
  • Microsoft Edge 93

Important ⚠

  • ⬆ .NET Core Apps 2.1 are no longer supported for our CLI tooling. As of August 31st, 2021, .NET Core 2.1 is no longer supported and will not receive any security updates. We've decided to move the CLI forward and require .NET Core 3.1 as a minimum.

v1.14.1

24 Aug 18:16
48cbcf9
Compare
Choose a tag to compare

Highlights

This patch includes bug fixes for the following issues:

microsoft/playwright#8287 - [BUG] webkit crashes intermittently: "file data stream has an unexpected number of bytes"
microsoft/playwright#8281 - [BUG] HTML report crashes if diff snapshot does not exists
microsoft/playwright#8230 - Using React Selectors with multiple React trees
microsoft/playwright#8366 - [BUG] Mark timeout in isVisible as deprecated and noop

Browser Versions

  • Chromium 94.0.4595.0
  • Mozilla Firefox 91.0
  • WebKit 15.0

This version of Playwright was also tested against the following stable channels:

  • Google Chrome 92
  • Microsoft Edge 92

v1.14.0

19 Aug 13:15
dc38ab9
Compare
Choose a tag to compare

⚡️ New "strict" mode

Selector ambiguity is a common problem in automation testing. "strict" mode
ensures that your selector points to a single element and throws otherwise.

Pass Strict = true into your action calls to opt in.

// This will throw if you have more than one button!
await page.ClickAsync("button", new () { Strict = true } );

📍 New Locators API

Locator represents a view to the element(s) on the page. It captures the logic sufficient to retrieve the element at any given moment.

The difference between the Locator and ElementHandle is that the latter points to a particular element, while Locator captures the logic of how to retrieve that element.

Also, locators are "strict" by default!

var locator = page.Locator("button");
await locator.ClickAsync();

Learn more in the documentation.

🧩 Experimental React and Vue selector engines

React and Vue selectors allow selecting elements by its component name and/or property values. The syntax is very similar to attribute selectors and supports all attribute selector operators.

await page.ClickAsync("_react=SubmitButton[enabled=true]");
await page.ClickAsync("_vue=submit-button[enabled=true]");

Learn more in the react selectors documentation and the vue selectors documentation.

✨ New nth and visible selector engines

  • nth selector engine is equivalent to the :nth-match pseudo class, but could be combined with other selector engines.
  • visible selector engine is equivalent to the :visible pseudo class, but could be combined with other selector engines.
// select the first button among all buttons
await button.ClickAsync("button >> nth=0");
// or if you are using locators, you can use first(), nth() and last()
await page.Locator("button").First.ClickAsync();

// click a visible button
await button.ClickAsync("button >> visible=true");

.NET Specific Features

  • 🧪 SkipAttribute We now have a NUnit attribute that can be used to skip various combinations of browser and/or platforms.

Browser Versions

  • Chromium 94.0.4595.0
  • Mozilla Firefox 91.0
  • WebKit 15.0

This version of Playwright was also tested against the following stable channels:

  • Google Chrome 92
  • Microsoft Edge 92

v1.13.0

21 Jul 17:45
6a5fa30
Compare
Choose a tag to compare

Playwright

  • 🖖 Programmatic drag-and-drop support via the Page.DragAndDropAsync() API.
  • 🔎 Enhanced HAR with body sizes for requests and responses. Use via RecordHarPath option in Browser.NewContextAsync().
  • 🔒 Assembly Signing for .NET assemblies is no longer done using PublicSign but using a full signing key, making it easier to use in projects requiring full-trust

Tools

  • Playwright Trace Viewer now shows parameters, returned values and console.log() calls.

New and Overhauled Guides

Browser Versions

  • Chromium 93.0.4576.0
  • Mozilla Firefox 90.0
  • WebKit 14.2

New Playwright APIs

v1.12.2

14 Jun 23:06
161d8a6
Compare
Choose a tag to compare

Highlights

This patch release includes bugfixes for the following issues:

microsoft/playwright#7015 - [BUG] Firefox: strange undefined toJSON property on JS objects
microsoft/playwright#7048 - [BUG] Dialogs cannot be dismissed if tracing is on in Chromium or Webkit
microsoft/playwright#7058 - [BUG] Getting no video frame error for mobile chrome

Browser Versions

  • Chromium 93.0.4530.0
  • Mozilla Firefox 89.0
  • WebKit 14.2

This version of Playwright was also tested against the following stable channels:

  • Google Chrome 91
  • Microsoft Edge 91

v1.12.1

09 Jun 15:18
0ab2eee
Compare
Choose a tag to compare

Highlights

Browser Versions

  • Chromium 93.0.4530.0
  • Mozilla Firefox 89.0
  • WebKit 14.2

This version of Playwright was also tested against the following stable channels:

  • Google Chrome 91
  • Microsoft Edge 91

Breaking Changes

This release is a major release for the .NET port. We've completely redone the API surface in order to ensure parity with the rest of the supported languages. Unfortunately, this meant we had to introduce some breaking changes. The following list points out the key ones:

  • Installation of the browsers no longer happens automatically. Follow the steps in Getting started.
  • Optional arguments have been replaced with an options class. Method calls should look closer to .LaunchAsync(new() { Headless = false });
  • All decimal arguments are now float.
  • IAccessibility now returns a JSONElement
  • The use of System.Drawing.Point was dropped in favour of using our own, generated Position
  • timeout and delay arguments are now float.
  • The usage of the Rect class was replaced by ElementHandleBoundingBoxResult.
  • WaitForState was renamed to WaitForSelectorState.
  • SelectOption was renamed to SelectOptionValue.
  • EventArgs were removed in favor of the class the EventArg was wrapping. For instance Page.Close is now an EventHandler<IPage> and Page.Download is now an EventHandler<IDownload>.
  • Modifier was renamed to KeyboardModifier.
  • LifecycleEvent was renamed to LoadState.
  • Arrays are now exposed as ReadOnlyCollection.

Other Breaking Changes

IBrowserContext

Events

New event: EventHandler<IRequest> Request
New event: EventHandler<IRequest> RequestFailed
New event: EventHandler<IRequest> RequestFinished
New event: EventHandler<IResponse> Response

Properties

  • DefaultTimeout has been replaced with SetDefaultTimeout
  • DefaultNavigationTimeout has been replaced with SetDefaultNavigationTimeout

Methods

  • GetCookiesAsync has been replaced with CookiesAsync
  • GetStorageStateAsync has been replaced with StorageStateAsync
  • SetHttpCredentialsAsync has been removed.
  • WaitForEventAsync has been replaced with WaitForPageAsync and RunAndWaitForPageAsync.

IElementHandle

Methods

  • GetBoundingBoxAsync has been replaced with BoundingBoxAsync
  • GetContentFrameAsync has been replaced with ContentFrameAsync
  • GetInnerHtmlAsync has been replaced with InnerHTMLAsync
  • GetInnerTextAsync has been replaced with InnerTextAsync
  • GetOwnerFrameAsync has been replaced with OwnerFrameAsync
  • GetTextContentAsync has been replaced with TextContentAsync

IFrame

Methods

  • GetContentAsync has been replaced with ContentAsync
  • GetFrameElementAsync has been replaced with FrameElementAsync
  • GetInnerHtmlAsync has been replaced with InnerHTMLAsync
  • GetInnerTextAsync has been replaced with InnerTextAsync
  • GetTextContentAsync has been replaced with TextContentAsync
  • GetTitleAsync has been replaced with TitleAsync
  • GoToAsync has been replaced with GotoAsync

IJSHandle

Methods

  • GetJsonValueAsync has been replaced with JsonValueAsync

IPage

Events

Properties

  • DefaultTimeout has been removed.
  • DefaultNavigationTimeout has been removed.
  • Coverage has been removed.

Methods

  • GetContentAsync has been replaced with ContentAsync
  • GetFrame has been replaced with Frame
  • GetInnerHtmlAsync has been replaced with InnerHTMLAsync
  • GetInnerTextAsync has been replaced with InnerTextAsync
  • GetOpenerAsync has been replaced with OpenerAsync
  • GetPdfAsync has been replaced with PdfAsync
  • GetTextContentAsync has been replaced with TextContentAsync
  • GetTitleAsync has been replaced with TitleAsync``
  • GoToAsync has been replaced with GotoAsync
  • WaitForEventAsync has been replaced with more specific WaitFor* overloads

IRequest

Methods

  • GetPostDataJson has been replaced with PostDataJSON
  • GetResponseAsync has been replaced with ResponseAsync

IResponse

Methods

  • GetBodyAsync has been replaced with BodyAsync
  • GetJsonAsync has been replaced with JsonAsync
  • GetTextAsync has been replaced with TextAsync

IVideo

Methods

  • GetPathAsync has been replaced with PathAsync

IWebSocket

Methods

  • WaitForEventAsync has been removed.

Removed Types

  • ICoverage has been removed.
  • IConnectionTransport has been removed.
  • ICDPSession has been removed.
  • IChromiumBrowser has been removed.
  • IChromiumBrowserContext has been removed.
  • IChromiumBrowserType has been removed.

v0.192.0

12 Mar 17:41
1069712
Compare
Choose a tag to compare

Changes

  • Introduces additional tests for postData and encoding support
  • Driver updated to 1.9.2.