WebComponentsHelper 2025.12.17.1
See the version list below for details.
dotnet add package WebComponentsHelper --version 2025.12.17.1
NuGet\Install-Package WebComponentsHelper -Version 2025.12.17.1
<PackageReference Include="WebComponentsHelper" Version="2025.12.17.1" />
<PackageVersion Include="WebComponentsHelper" Version="2025.12.17.1" />
<PackageReference Include="WebComponentsHelper" />
paket add WebComponentsHelper --version 2025.12.17.1
#r "nuget: WebComponentsHelper, 2025.12.17.1"
#:package WebComponentsHelper@2025.12.17.1
#addin nuget:?package=WebComponentsHelper&version=2025.12.17.1
#tool nuget:?package=WebComponentsHelper&version=2025.12.17.1
WebComponentsHelper
A modular, reusable Page Object and UI Component library for web automation, built on top of Selenium WebDriver.
Targets .NET Standard 2.0 and .NET 8 for broad compatibility.
Features
- Page Object Model (POM) Support:
Organize your automation using page objects for maintainability and scalability. - Reusable UI Components:
Includes ready-to-use components likeTextBoxComponent,ButtonComponent, and extensible base classes for custom components. - BaseComponent Abstraction:
All components inherit fromBaseComponent, which provides robust Selenium wrapper methods for element interaction and waiting. - Strongly-Typed Page Objects:
Example:LoginPagecomposesTextBoxComponentandButtonComponentfor clear, maintainable test code. - Extensible:
Easily add new components (e.g.,CheckboxComponent,DropdownComponent) following the same pattern.
Project Structure
/WebComponentsHelper /Components BaseComponent.cs ButtonComponent.cs TextBoxComponent.cs ... /PageObjects LoginPage.cs ...
Class Diagram
class SeleniumBase {
+WebDriver driver
+WaitUntilElementExists()
+WaitUntilElementVisible()
+Click()
+InputText()
+GetStringValue()
...
}
class BaseComponent {
<<abstract>>
+By _locator
+Element
+VisibleElement
+IsDisplayed()
+GetText()
...
}
class TextBoxComponent {
+EnterText()
+GetValue()
}
class ButtonComponent {
+Click()
+IsEnabled()
}
class LoginPage {
+TextBoxComponent UsernameTextBox
+TextBoxComponent PasswordTextBox
+ButtonComponent LoginButton
+Login()
}
SeleniumBase <|-- BaseComponent
BaseComponent <|-- TextBoxComponent
BaseComponent <|-- ButtonComponent
LoginPage o-- TextBoxComponent
LoginPage o-- ButtonComponent
Usage Example
using OpenQA.Selenium; using WebComponentsHelper.PageObjects;
class Example { public void LoginTest(IWebDriver driver) { var loginPage = new LoginPage(driver); loginPage.Login("user1", "password1"); } }
Example: Login Page Object
namespace WebComponentsHelper.PageObjects
{
public class LoginPage
{
public TextBoxComponent UsernameTextBox { get; }
public TextBoxComponent PasswordTextBox { get; }
public ButtonComponent LoginButton { get; }
public LoginPage(IWebDriver driver)
{
UsernameTextBox = new TextBoxComponent(driver, By.Id("username"));
PasswordTextBox = new TextBoxComponent(driver, By.Id("password"));
LoginButton = new ButtonComponent(driver, By.Id("loginBtn"));
}
public void Login(string username, string password)
{
UsernameTextBox.EnterText(username);
PasswordTextBox.EnterText(password);
LoginButton.Click();
}
}
}
Requirements
- .NET Standard 2.0 or .NET 8.0 or later
- Selenium.WebDriver
- SeleniumHelpers (for SeleniumBase and wrappers)
Extending
To add a new component, inherit from BaseComponent and implement your custom logic:
namespace WebComponentsHelper.Components { /// <summary> /// CheckboxComponent represents a checkbox UI component, providing methods to interact with and query its state. /// </summary>
public class CheckboxComponent : BaseComponent
{
public CheckboxComponent(IWebDriver driver, By locator)
: base(driver, locator)
{
}
/// <summary>
/// Checks the checkbox if it is not already checked.
/// </summary>
public void Check()
{
var checkbox = Element;
if (!checkbox.Selected)
{
Click(checkbox);
}
}
/// <summary>
/// Unchecks the checkbox if it is checked.
/// </summary>
public void Uncheck()
{
var checkbox = Element;
if (checkbox.Selected)
{
Click(checkbox);
}
}
/// <summary>
/// Toggles the checkbox state.
/// </summary>
public void Toggle()
{
var checkbox = Element;
Click(checkbox);
}
/// <summary>
/// Returns true if the checkbox is checked.
/// </summary>
public bool IsChecked()
{
return Element.Selected;
}
}
}
| 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 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 was computed. 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
- OneStreamAutoLibrary.CommonHelpers (>= 2025.12.16.2)
- OneStreamAutoLibrary.SeleniumHelpers (>= 2025.12.16.2)
-
net8.0
- OneStreamAutoLibrary.CommonHelpers (>= 2025.12.16.2)
- OneStreamAutoLibrary.SeleniumHelpers (>= 2025.12.16.2)
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 |
|---|---|---|
| 2025.12.19.1 | 190 | 12/19/2025 |
| 2025.12.18.1 | 263 | 12/18/2025 |
| 2025.12.17.1 | 260 | 12/17/2025 |
| 2025.12.16.5 | 258 | 12/16/2025 |
| 2025.12.16.4 | 259 | 12/16/2025 |
| 2025.12.16.3 | 252 | 12/16/2025 |
| 2025.12.16.2 | 260 | 12/16/2025 |