WebDriverBiDi.Extensions
0.0.63
dotnet add package WebDriverBiDi.Extensions --version 0.0.63
NuGet\Install-Package WebDriverBiDi.Extensions -Version 0.0.63
<PackageReference Include="WebDriverBiDi.Extensions" Version="0.0.63" />
<PackageVersion Include="WebDriverBiDi.Extensions" Version="0.0.63" />
<PackageReference Include="WebDriverBiDi.Extensions" />
paket add WebDriverBiDi.Extensions --version 0.0.63
#r "nuget: WebDriverBiDi.Extensions, 0.0.63"
#:package WebDriverBiDi.Extensions@0.0.63
#addin nuget:?package=WebDriverBiDi.Extensions&version=0.0.63
#tool nuget:?package=WebDriverBiDi.Extensions&version=0.0.63
WebDriverBiDi.Extensions
Conveniences for the WebDriverBiDi .NET client library, for code that works with the protocol directly.
- One-call extension methods for common commands, returning natural .NET types: a screenshot as
byte[], located nodes as a list of references, a script's result as theRemoteValuetype you ask for. InputBuilder, which buildsinput.performActionssequences tick by tick, with helpers for clicking, typing, key chords, drag-and-drop, and scrolling.- Works on .NET Standard 2.0, .NET 8 and later, and with native AOT.
Every type and extension method is in the namespace of the module it belongs with (WebDriverBiDi.BrowsingContext, WebDriverBiDi.Input, WebDriverBiDi.Network, WebDriverBiDi.Script, WebDriverBiDi.Session), so the using directives you already have bring them into scope. Each extension method sends one command, or a short fixed sequence, and takes the same timeout override and CancellationToken as the command it wraps.
Installation
dotnet add package WebDriverBiDi.Extensions
Quick Start
With a connected BiDiDriver:
using WebDriverBiDi.BrowsingContext;
using WebDriverBiDi.Script;
IReadOnlyList<BrowsingContextInfo> tabs = await driver.BrowsingContext.GetTopLevelBrowsingContextsAsync();
string contextId = tabs[0].BrowsingContextId;
await driver.BrowsingContext.NavigateAsync(contextId, "https://example.com", ReadinessState.Complete);
StringRemoteValue title = await driver.Script.CallFunctionAsync<StringRemoteValue>(contextId, "() => document.title");
byte[] png = await driver.BrowsingContext.CaptureScreenshotAsync(contextId);
File.WriteAllBytes("example.png", png);
A script that throws is reported as a ScriptException, whose Details carry the browser's description of the JavaScript exception.
Input
using WebDriverBiDi.BrowsingContext;
using WebDriverBiDi.Input;
using WebDriverBiDi.Script;
IReadOnlyList<SharedReference> searchBoxes = await driver.BrowsingContext.LocateNodesByCssSelectorAsync(contextId, "input[name=q]");
InputBuilder builder = new InputBuilder()
.AddClickOnElementAction(searchBoxes[0])
.AddSendKeysToActiveElementAction("WebDriver BiDi")
.AddSendKeysToActiveElementAction(Keys.Enter);
await driver.Input.PerformActionsAsync(contextId, builder);
// Releases any keys or buttons an action sequence left pressed.
await driver.Input.ReleaseActionsAsync(contextId);
Each action added is one tick, in which every other input source pauses; AddActions puts several sources' actions in one tick. Text is typed one user-perceived character at a time, so emoji and combining sequences arrive whole, on .NET Framework too. Keys names the special keys (Enter, Shift, the arrows, and so on). For finer control, create sources with CreateKeyInputSource, CreatePointerInputSource (mouse, pen, or touch), CreateWheelInputSource, and CreateNoneInputSource, and add the actions they create.
Documentation
The WebDriverBiDi.Extensions guide covers the package in more detail, and the API reference lists every member.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.12)
- System.Text.Json (>= 10.0.12)
- WebDriverBiDi (>= 0.0.63)
-
net10.0
- WebDriverBiDi (>= 0.0.63)
-
net8.0
- System.Text.Json (>= 10.0.12)
- WebDriverBiDi (>= 0.0.63)
-
net9.0
- WebDriverBiDi (>= 0.0.63)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on WebDriverBiDi.Extensions:
| Package | Downloads |
|---|---|
|
Dramaturge
A high-level browser automation API with automatic waiting, built on WebDriver BiDi with the WebDriverBiDi .NET library. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.63 | 37 | 10/6/2026 |