Interface IWebBackendDownloads

Namespace
ProtoTest.Web
Assembly
ProtoTest.Web.dll

Optional backend capability: captures a file the browser downloads. Playwright implements it with its native download waiter. Selenium implements it by throwing WebBackendCapabilityException because the WebDriver protocol has no download API, so a session using Selenium fails before the trigger runs instead of quietly capturing nothing.

public interface IWebBackendDownloads
Extension Methods

Methods

DownloadAsync(Func<CancellationToken, Task>, TimeSpan?, CancellationToken)

Runs trigger (the action that starts the download) and returns the file it produced, waiting up to timeout when one is given.

ValueTask<WebDownload> DownloadAsync(Func<CancellationToken, Task> trigger, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

trigger Func<CancellationToken, Task>
timeout TimeSpan?
cancellationToken CancellationToken

Returns

ValueTask<WebDownload>