Skip to content

v1.12.1

Compare
Choose a tag to compare
@avodovnik avodovnik released this 09 Jun 15:18
0ab2eee

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.