Class WebAssertions

Namespace
ProtoTest.Web
Assembly
ProtoTest.Web.dll

The assertions for one element, in their positive (Should) or negated (ShouldNot) form. Each assertion polls until it passes or its timeout elapses.

public sealed class WebAssertions
Inheritance
WebAssertions
Inherited Members
Extension Methods

Methods

BeCheckedAsync(TimeSpan?, CancellationToken)

Asserts that the element becomes checked.

public ValueTask BeCheckedAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan?
cancellationToken CancellationToken

Returns

ValueTask

BeEnabledAsync(TimeSpan?, CancellationToken)

Asserts that the element becomes enabled.

public ValueTask BeEnabledAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan?
cancellationToken CancellationToken

Returns

ValueTask

BeVisibleAsync(TimeSpan?, CancellationToken)

Asserts that the element becomes visible.

public ValueTask BeVisibleAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan?
cancellationToken CancellationToken

Returns

ValueTask

ContainTextAsync(string, TimeSpan?, CancellationToken)

Asserts that the element's text becomes a superstring of expected.

public ValueTask ContainTextAsync(string expected, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

expected string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

ValueTask

HaveTextAsync(string, TimeSpan?, CancellationToken)

Asserts that the element's text becomes exactly expected.

public ValueTask HaveTextAsync(string expected, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

expected string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

ValueTask

HaveValueAsync(string, TimeSpan?, CancellationToken)

Asserts that the element's value becomes exactly expected.

public ValueTask HaveValueAsync(string expected, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

expected string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

ValueTask