Gripper

A web-scraping toolbox for .NET.

View on GitHub

Gripper.WebClient

Gripper.WebClient.IContext

IContext.WaitUntilElementPresentAsync(string, PollSettings, CancellationToken) Method

Polls for an element defined by a specified CSS selector.

System.Threading.Tasks.Task<Gripper.WebClient.IElement?> WaitUntilElementPresentAsync(string cssSelector, Gripper.WebClient.PollSettings pollSettings, System.Threading.CancellationToken cancellationToken);

Parameters

cssSelector System.String
The CSS selector of the targeted element.

pollSettings PollSettings
Settings that control the polling for changes to the DOM.

cancellationToken System.Threading.CancellationToken
Token to cancel the System.Threading.Tasks.Task.

Returns

System.Threading.Tasks.Task<IElement>
The resulting IElement,
or null if no element was matched within the document of the iFrame before the TimeoutMs period elapsed.