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
searchText
stringthe text to search. Cannot be null or empty.
options
FindOptionsthe options such as direction and match case.
intermediateResultsHandler
IHandler<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.