Click or drag to resize

ITextFinderFind Method

Performs search of the given searchText with the given options, highlights all matches and selects the first match on the currently loaded web page.

Namespace:  DotNetBrowser.Search
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.27.7
Syntax
C#
Task<FindResult> Find(
	string searchText,
	FindOptions options = null,
	IHandler<FindResultReceivedParameters> intermediateResultsHandler = null
)

Parameters

searchText
Type: SystemString
the text to search. Cannot be null or empty.
options (Optional)
Type: DotNetBrowser.SearchFindOptions
the options such as direction and match case.
intermediateResultsHandler (Optional)
Type: DotNetBrowser.HandlersIHandlerFindResultReceivedParameters
the handler which is called when some search results are received.

Return Value

Type: TaskFindResult
a Task which completes when the search is finished. The result of the task is the last find result received from Chromium.
Exceptions
ExceptionCondition
ObjectDisposedExceptionThe ITextFinder has already been disposed.
Remarks
The search is performed only through a visible content on the loaded web page. If some text is presented on the web page, but due to CSS rules it's not visible, the text finder will not check this content during search. Also, it doesn't find text on the web pages with an empty size, so make sure that the size of the browser instance where the text search is performed isn't empty.
See Also