Lyo.Web.Automation.Selenium 1.0.1

dotnet add package Lyo.Web.Automation.Selenium --version 1.0.1
                    
NuGet\Install-Package Lyo.Web.Automation.Selenium -Version 1.0.1
                    
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="Lyo.Web.Automation.Selenium" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lyo.Web.Automation.Selenium" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Lyo.Web.Automation.Selenium" />
                    
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 Lyo.Web.Automation.Selenium --version 1.0.1
                    
#r "nuget: Lyo.Web.Automation.Selenium, 1.0.1"
                    
#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 Lyo.Web.Automation.Selenium@1.0.1
                    
#: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=Lyo.Web.Automation.Selenium&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Lyo.Web.Automation.Selenium&version=1.0.1
                    
Install as a Cake Tool

Lyo.Web.Automation.Selenium

Selenium WebDriver implementation of the engine-agnostic Lyo.Web.Automation abstractions: browser launch (Chrome / Edge / Firefox / Safari + Selenium Grid), session isolation, polling, tab/frame/dialog/keyboard helpers, typed element controls, automation plans, and DI registration.

Examples

Quick start

services.AddSeleniumBrowserServiceFromConfiguration(builder.Configuration);

// later, per-operation:
var service = sp.GetRequiredService<ISeleniumBrowserService>();
using var session = service.CreateSession();
await session.StartBrowserAsync();
await session.Browser.NavigateAsync("https://example.com");

Surface — Browser (Browser/)

  • SeleniumBrowser — concrete IWebAutomationBrowser (PageBase); composes SeleniumBrowserTabs, BrowserAlerts, BrowserKeyboard, FrameNavigator, SeleniumPolling.
  • SeleniumWebAutomationElementIWebAutomationElement adapter on top of IWebElement.
  • TabManager / SeleniumBrowserTabs — engine-native and abstract-tab management.
  • BrowserCookieExtensions — typed cookie helpers.
  • BrowserUrlRedaction — query-string/fragment redaction used in logs when MaskSensitiveUrlsInLogs is set.

Surface — Service (Service/)

  • ISeleniumBrowserService — singleton factory: CreateSession(SeleniumSessionOptions?), ActiveSessionCount, Dispose.
  • ISeleniumBrowserSession — scoped session (Browser, Tabs, dispose to release WebDriver resources).
  • SeleniumExecutionContext / SeleniumExecutionContextFactory — wiring used by the automation runners.
  • SeleniumMetricTags — metric-tag constants.

Surface — Configuration (Configuration/)

SeleniumBrowserOptions holds application-wide defaults; SeleniumSessionOptions is the per-session subclass passed to CreateSession. Configuration section: "SeleniumBrowserOptions".

Property Default Notes
BrowserKind Chrome SeleniumBrowserKind: Chrome, Edge, Firefox, Safari.
Headless false Headless mode where supported.
RemoteWebDriverUri null When set, drives RemoteWebDriver against a Selenium Grid / standalone server.
UserAgents 4 desktop UAs Round-robined for stealth.
WebDriverArguments disable-infobars, disable-extensions, disable-gpu, disable-dev-shm-usage, no-sandbox Use AddArgument(key, value?) to append key=value (or bare key) entries.
StartupScripts [] JS injected via CDP Page.addScriptToEvaluateOnNewDocument (Chrome/Edge only) — bypass bot-detection traps.
EnablePerformanceLogging true Required for CDP-based network observation in IWebAutomationNavigator.NavigateAsync. Disable on sites that detect CDP, then provide a JS interception script in StartupScripts.
BrowserWindowWidth/Height 1280 × 1024 Initial window size.
PageLoadTimeoutSeconds 30 Page-load timeout.
ImplicitWaitSeconds 10 WebDriver implicit wait.
ScriptTimeoutSeconds 30 Async-script timeout.
SeleniumMaxWaitSeconds 15 Wrapper for explicit waits.
EnableMetrics true Emit IMetrics instrumentation when an IMetrics is registered.
MaskSensitiveUrlsInLogs false Strip query/fragment in log lines.
ServiceRootDirectory {tmp}/lyo-selenium Each session creates session-{id}/ with browser-profile/, artifacts/, downloads/.
BrowserUserDataDirectory / DownloadDirectory / ArtifactsDirectory derived under session dir Override individually if needed.
PollingMaxAttempts / PollingDelayBetweenAttempts 5 / 500 ms Outer-loop control for SeleniumBrowser.PollFor.
Clone() Deep copy used to derive session-specific options.

SeleniumBrowserOptionsBuilder is a fluent builder over the options record.

Surface — Typed element controls (Controls/)

Wrappers over IWebElement for typed interactions: WebElementControl (base), InputControl (Value, SendKeys), TextAreaControl, ButtonControl, LinkControl, SelectControl, CheckboxControl. Resolve via SeleniumBrowser element APIs and hold them across explicit waits.

Surface — WebDriver / Automation (WebDriver/, Automation/ElementLocatorMapping.cs)

Driver-factory helpers (Chrome / Edge / Firefox / Safari + Remote) and the locator mapping that lets Lyo.Web.Automation JSON automation plans target Selenium-style locators.

DI registration (Service/Extensions.cs)

All registrations are extension methods on IServiceCollection:

Method Registers
AddSeleniumBrowser(Action<SeleniumBrowserOptions>?) Singleton SeleniumBrowserOptions, scoped SeleniumBrowser for direct injection (legacy style).
AddSeleniumBrowser(Action<SeleniumBrowserOptionsBuilder>) Same, with options built fluently.
AddSeleniumBrowser(SeleniumBrowserOptions) Same, with explicit options instance.
AddSeleniumBrowserService(Action<SeleniumBrowserOptions>?) Above + singleton ISeleniumBrowserService (use this for session-based usage via CreateSession).
AddSeleniumBrowserService(Action<SeleniumBrowserOptionsBuilder>) Same, fluent options.
AddSeleniumBrowserService(SeleniumBrowserOptions) Same, explicit options.
AddSeleniumBrowserServiceFromConfiguration(IConfiguration, sectionName?) Binds options from configuration (default section "SeleniumBrowserOptions").

Dependencies

Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).

  • Lyo.IO.Temp — (direct, lyo)
  • Lyo.Web.Automation — (direct, lyo)
  • Microsoft.Extensions.DependencyInjection.Abstractions 10.0.5 — (direct, microsoft)
  • Microsoft.Extensions.Logging.Abstractions 10.0.5 — (direct, microsoft)
  • Microsoft.Extensions.Options.ConfigurationExtensions 10.0.5 — (direct, microsoft)
  • Selenium.Support 4.46.0 — (direct, third-party)
  • Selenium.WebDriver 4.46.0 — (direct, third-party)
  • System.Text.Json 10.0.5 — (direct, microsoft, netstandard2.0)
  • Lyo.Common — (transitive, lyo)
  • Lyo.Exceptions — (transitive, lyo)
  • Lyo.Formatter — (transitive, lyo)
  • Lyo.Metrics — (transitive, lyo)
  • Microsoft.Bcl.AsyncInterfaces 10.0.5 — (transitive, microsoft, netstandard2.0)
  • Microsoft.Extensions.Configuration.Binder 10.0.5 — (transitive, microsoft)
  • Microsoft.Extensions.Hosting.Abstractions 10.0.5 — (transitive, microsoft)
  • SmartFormat.NET 3.6.1 — (transitive, third-party)
  • System.Memory 4.6.3 — (transitive, microsoft, netstandard2.0)
Product 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 was computed.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 0 8/18/2026
1.0.0 93 8/16/2026