HumanCursor.Playwright
1.0.0
dotnet add package HumanCursor.Playwright --version 1.0.0
NuGet\Install-Package HumanCursor.Playwright -Version 1.0.0
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="HumanCursor.Playwright" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HumanCursor.Playwright" Version="1.0.0" />
<PackageReference Include="HumanCursor.Playwright" />
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 HumanCursor.Playwright --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HumanCursor.Playwright, 1.0.0"
#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 HumanCursor.Playwright@1.0.0
#: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=HumanCursor.Playwright&version=1.0.0
#tool nuget:?package=HumanCursor.Playwright&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
HumanCursor
Human-like cursor movement for Playwright. Generates realistic mouse trajectories using Bézier curves and natural easing functions to avoid bot detection.
Installation
dotnet add package HumanCursor.Playwright
Usage
using HumanCursor.Playwright;
using Microsoft.Playwright;
var playwright = await Playwright.CreateAsync();
var browser = await playwright.Chromium.LaunchAsync(new() { Headless = false });
var page = await browser.NewPageAsync();
// Optional: show cursor visualization for debugging
await page.ShowCursorAsync();
await page.GotoAsync("https://example.com");
// Click on an element with human-like movement
var button = page.Locator("button#submit");
await button.HumanClickAsync();
// Move to coordinates
await page.HumanMoveToAsync(500, 300);
// Move by relative offset
await page.HumanMoveByAsync(100, -50);
// Drag and drop
var source = page.Locator("#draggable");
var target = page.Locator("#droppable");
await source.HumanDragToAsync(target);
API
Page Extensions
HumanMoveToAsync(x, y, options?)- Move cursor to absolute coordinatesHumanMoveByAsync(dx, dy, options?)- Move cursor by relative offsetShowCursorAsync()- Enable cursor visualization (call before navigation)ShowCursorNowAsync()- Enable cursor visualization on current page
Locator Extensions
HumanClickAsync(options?)- Click with human-like movementHumanMoveAsync(options?)- Move to elementHumanDragToAsync(target, options?)- Drag to another elementHumanScrollIntoViewAsync()- Scroll element into view with mouse wheelHumanControlScrollBarAsync(percentage, orientation)- Control scroll bar elements
Options
new HumanCursorOptions
{
RelativePosition = (0.5f, 0.5f), // Click position within element (0-1)
Steady = false, // Reduce curve distortion for precise movements
ClickCount = 1, // Number of clicks
ClickDuration = 0, // Hold duration in ms (0 = instant)
ScrollIntoView = true // Auto-scroll element into view
}
License
MIT
| Product | Versions 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.
-
net10.0
- Microsoft.Playwright (>= 1.56.0)
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.0 | 688 | 12/1/2025 |