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
optionsclass. Method calls should look closer to.LaunchAsync(new() { Headless = false }); - All
decimalarguments are nowfloat. IAccessibilitynow returns aJSONElement- The use of
System.Drawing.Pointwas dropped in favour of using our own, generatedPosition timeoutanddelayarguments are nowfloat.- The usage of the
Rectclass was replaced byElementHandleBoundingBoxResult. WaitForStatewas renamed toWaitForSelectorState.SelectOptionwas renamed toSelectOptionValue.EventArgs were removed in favor of the class theEventArgwas wrapping. For instancePage.Closeis now anEventHandler<IPage>andPage.Downloadis now anEventHandler<IDownload>.Modifierwas renamed toKeyboardModifier.LifecycleEventwas renamed toLoadState.- 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
DefaultTimeouthas been replaced withSetDefaultTimeoutDefaultNavigationTimeouthas been replaced withSetDefaultNavigationTimeout
Methods
GetCookiesAsynchas been replaced withCookiesAsyncGetStorageStateAsynchas been replaced withStorageStateAsyncSetHttpCredentialsAsynchas been removed.WaitForEventAsynchas been replaced withWaitForPageAsyncandRunAndWaitForPageAsync.
IElementHandle
Methods
GetBoundingBoxAsynchas been replaced withBoundingBoxAsyncGetContentFrameAsynchas been replaced withContentFrameAsyncGetInnerHtmlAsynchas been replaced withInnerHTMLAsyncGetInnerTextAsynchas been replaced withInnerTextAsyncGetOwnerFrameAsynchas been replaced withOwnerFrameAsyncGetTextContentAsynchas been replaced withTextContentAsync
IFrame
Methods
GetContentAsynchas been replaced withContentAsyncGetFrameElementAsynchas been replaced withFrameElementAsyncGetInnerHtmlAsynchas been replaced withInnerHTMLAsyncGetInnerTextAsynchas been replaced withInnerTextAsyncGetTextContentAsynchas been replaced withTextContentAsyncGetTitleAsynchas been replaced withTitleAsyncGoToAsynchas been replaced withGotoAsync
IJSHandle
Methods
GetJsonValueAsynchas been replaced withJsonValueAsync
IPage
Events
Properties
DefaultTimeouthas been removed.DefaultNavigationTimeouthas been removed.Coveragehas been removed.
Methods
GetContentAsynchas been replaced withContentAsyncGetFramehas been replaced withFrameGetInnerHtmlAsynchas been replaced withInnerHTMLAsyncGetInnerTextAsynchas been replaced withInnerTextAsyncGetOpenerAsynchas been replaced withOpenerAsyncGetPdfAsynchas been replaced withPdfAsyncGetTextContentAsynchas been replaced withTextContentAsyncGetTitleAsynchas been replaced with TitleAsync``GoToAsynchas been replaced withGotoAsyncWaitForEventAsynchas been replaced with more specificWaitFor*overloads
IRequest
Methods
GetPostDataJsonhas been replaced withPostDataJSONGetResponseAsynchas been replaced withResponseAsync
IResponse
Methods
GetBodyAsynchas been replaced withBodyAsyncGetJsonAsynchas been replaced withJsonAsyncGetTextAsynchas been replaced withTextAsync
IVideo
Methods
GetPathAsynchas been replaced withPathAsync
IWebSocket
Methods
WaitForEventAsynchas been removed.
Removed Types
ICoveragehas been removed.IConnectionTransporthas been removed.ICDPSessionhas been removed.IChromiumBrowserhas been removed.IChromiumBrowserContexthas been removed.IChromiumBrowserTypehas been removed.
You can’t perform that action at this time.
from Hacker News https://ift.tt/3cx7czQ
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.