Releases: microsoft/playwright-dotnet
Releases · microsoft/playwright-dotnet
v0.151.0
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()
andBrowserType.LaunchPersistentContextAsync()
now supportvideosPath
andvideoSize
option.- New
Page.Video
property. - New
Video
class - New
BrowserContext.Browser
property. - Both
BrowserContext.ExposeBindingAsync()
andPage.ExposeBindingAsync()
now accept aFunc<BindingSource, IJSHandle, TResult>
to receivedIJSHandle
instead of of serialized values.