Method Find
- Namespace
- DotNetBrowser.Search
- Assembly
- DotNetBrowser.dll
Find(string, FindOptions, IHandler<FindResultReceivedParameters>)
Performs search of the given searchText with the given options,
highlights all matches and selects the first match on the currently loaded web page.
Task<FindResult> Find(string searchText, FindOptions options = null, IHandler<FindResultReceivedParameters> intermediateResultsHandler = null)
Parameters
searchTextstringthe text to search. Cannot be null or empty.
optionsFindOptionsthe options such as direction and match case.
intermediateResultsHandlerIHandler<FindResultReceivedParameters>the handler which is called when some search results are received.
Returns
- Task<FindResult>
a Task which completes when the search is finished. The result of the task is the last find result received from Chromium.
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.
Exceptions
- ObjectDisposedException
The ITextFinder has already been disposed.