Skip to content

[🚀 Feature]: [dotnet] [bidi] Introduce CancellationToken for async commands #16989

@nvborisenko

Description

@nvborisenko

Description

Now:

await context.NavigateAsync("https://google.com/", new() { Wait = ReadinessState.Complete, Timeout = TimeSpan.FromSeconds(50) });
// 30 secs by default

Proposed:

await context.NavigateAsync("https://google.com/", new() { Wait = ReadinessState.Complete, Timeout = TimeSpan.FromSeconds(50) }, CancellationToken.None); // any optional token

API:

ExecuteSomeCommandAsync(string param1, ..., ExecuteSomeCommandOptions? = null, CancellationToken? cancellationToken = default)

Implementation notes

It should honor both provided, Timeout + CancellationToken via linked cancellation token source.

Have you considered any alternatives or workarounds?

Timeout is a winner in 99% cases. But to be modern library just follow best practices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!B-devtoolsIncludes everything BiDi or Chrome DevTools relatedC-dotnet.NET BindingsI-enhancementSomething could be better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions