Class WebAssertions
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
timeoutTimeSpan?cancellationTokenCancellationToken
Returns
BeEnabledAsync(TimeSpan?, CancellationToken)
Asserts that the element becomes enabled.
public ValueTask BeEnabledAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
timeoutTimeSpan?cancellationTokenCancellationToken
Returns
BeVisibleAsync(TimeSpan?, CancellationToken)
Asserts that the element becomes visible.
public ValueTask BeVisibleAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
timeoutTimeSpan?cancellationTokenCancellationToken
Returns
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
expectedstringtimeoutTimeSpan?cancellationTokenCancellationToken
Returns
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
expectedstringtimeoutTimeSpan?cancellationTokenCancellationToken
Returns
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
expectedstringtimeoutTimeSpan?cancellationTokenCancellationToken