G4.Abstraction.WebDriver 2026.11.8.25

dotnet add package G4.Abstraction.WebDriver --version 2026.11.8.25
                    
NuGet\Install-Package G4.Abstraction.WebDriver -Version 2026.11.8.25
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="G4.Abstraction.WebDriver" Version="2026.11.8.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="G4.Abstraction.WebDriver" Version="2026.11.8.25" />
                    
Directory.Packages.props
<PackageReference Include="G4.Abstraction.WebDriver" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add G4.Abstraction.WebDriver --version 2026.11.8.25
                    
#r "nuget: G4.Abstraction.WebDriver, 2026.11.8.25"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package G4.Abstraction.WebDriver@2026.11.8.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=G4.Abstraction.WebDriver&version=2026.11.8.25
                    
Install as a Cake Addin
#tool nuget:?package=G4.Abstraction.WebDriver&version=2026.11.8.25
                    
Install as a Cake Tool

G4.Abstraction.WebDriver

G4.Abstraction.WebDriver creates a G4™ WebDriver instance from a set of plain parameters. You give it a driver name, a place to find the driver (a folder or a server URL), timeouts and capabilities. It finds the matching driver plugin and returns an IWebDriver. G4 uses it to turn the driverParameters of an automation into a driver. It targets net10.0.

Installation

dotnet add package G4.Abstraction.WebDriver

The package brings in the driver packages it needs (Chrome, Edge, Firefox, Android, Appium, UIA, SAP and the simulator).

How it works

Step What happens Source
1 DriverFactory reads the parameters. Missing values take defaults. DriverFactory.cs:73-105
2 A driverBinaries value that starts with http:// or https:// selects a remote driver. Any other value selects a local driver. DriverFactory.cs:134-141
3 The factory finds the plugin class whose [G4DriverPlugin] name matches driver, ignoring case. DriverFactory.cs:185-200
4 The plugin builds its own options, merges your capabilities on top, and creates the driver. DriverPluginBase.cs:174-200
5 The factory sets the implicit, page load and script timeouts. Errors here are ignored. DriverFactory.cs:160-171

Parameters

Parameter Type Default Meaning
driver string ChromeDriver The driver plugin name. See the drivers table.
driverBinaries string . A folder with the driver executable, or a server or grid URL.
commandTimeout integer 60000 Milliseconds to wait for one command.
capabilities object empty alwaysMatch and firstMatch capabilities.
firstMatch array empty Extra firstMatch entries.
timeouts object implicit 0, pageLoad 300000, script 180000 Milliseconds for each driver timeout.
service object empty Read by the factory but not used yet.

Names are matched without regard to case. A value that cannot be read falls back to its default without an error, so check spelling first when a setting seems to be ignored. Source: DriverFactory.cs:73-105, Extensions/LocalExtensions.cs:104-140.

Create a driver

From a dictionary

using G4.Abstraction.WebDriver;

var driverParams = new Dictionary<string, object>
{
    ["driver"] = "SimulatorDriver",
    ["commandTimeout"] = 60000,
    ["driverBinaries"] = ".",
    ["timeouts"] = new Dictionary<string, object>
    {
        ["implicit"] = 500,
        ["pageLoad"] = 30000,
        ["script"] = 30000
    },
    ["capabilities"] = new Dictionary<string, object>
    {
        ["alwaysMatch"] = new Dictionary<string, object>
        {
            ["browserName"] = "Simulator"
        }
    }
};

var driver = new DriverFactory(driverParams).NewDriver();

From JSON

The string constructor reads the same parameters from JSON.

using G4.Abstraction.WebDriver;

var json = """
{
    "driver": "MicrosoftEdgeDriver",
    "driverBinaries": "http://localhost:4444/wd/hub",
    "capabilities": {
        "alwaysMatch": {
            "browserName": "MicrosoftEdge"
        }
    }
}
""";

var driver = new DriverFactory(json).NewDriver();

The URL in driverBinaries makes this a remote session on a Selenium Grid. Use a folder path such as C:\drivers instead to start a local driver.

Local and remote drivers

driverBinaries Mode Use it for
A folder path Local Starting chromedriver, msedgedriver, geckodriver or the SAP driver server on this machine.
http://host:port/wd/hub Remote A Selenium Grid, an Appium server, the UIA driver server, or the SAP driver server.

Capabilities merge

Your alwaysMatch entries replace plugin entries with the same key. Your firstMatch entries are added after the plugin ones, and empty entries are dropped. Source: DriverPluginBase.cs:180-196.

Errors

Situation Exception Message starts with
No plugin has the requested driver name NotImplementedException Unable to find or implement the required driver plugin.
The plugin has no NewLocalDriver or NewRemoteDriver method MissingMethodException Unable to find the initialize method for the driver.
The plugin does not support the requested mode NotImplementedException The method OnNewLocalDriver is not implemented. or The method OnNewRemoteDriver is not implemented.
The driver cannot start The base exception of the failure The original message

The first two are also written to the trace output. Source: DriverFactory.cs:203-232, DriverPluginBase.cs:59-82, 146-169.

Add your own driver

A driver plugin is a public class that derives from DriverPluginBase and carries the [G4DriverPlugin] attribute. See Write a custom driver plugin.

Limits

  • The service parameter is read but not passed to any driver yet.
  • A plugin must be found in an assembly that the G4 engine loads. See the custom driver page.

License

This library is released under the Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on G4.Abstraction.WebDriver:

Package Downloads
G4.Plugins

The G4™ Framework Plugins Core package provides essential infrastructure for building extensible plugins within the G4™ automation engine. Developers can create diverse plugins that seamlessly integrate with G4's core functionality.

ClientApp

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.11.8.25 657 11/8/2026
2026.11.3.24 572 11/3/2026
2026.8.20.23 632 8/20/2026
2026.8.20.22 130 8/20/2026
2026.8.20.21 141 8/20/2026
2026.4.29.20 1,083 4/29/2026
2026.3.15.19 399 3/15/2026
2026.3.15.18 149 3/15/2026
2026.2.11.17 245 2/11/2026
2025.3.7.16 1,244 3/7/2025
2025.2.7.15 234 2/7/2025
2025.2.7.14 640 2/7/2025
2025.2.6.13 277 2/6/2025
2025.2.5.12 249 2/5/2025
2025.2.5.11 256 2/5/2025
2025.2.5.10 257 2/5/2025
2025.2.5.9 228 2/5/2025
2025.2.5.8 230 2/5/2025
2025.2.4.7 350 2/4/2025
2025.2.3.6 380 2/3/2025
Loading failed