Finds the specified text within this Response,
specifying what action to take in case of failure.
Namespace: Facilita.WebAssembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.7.98 (1.0.0.0)
Syntax
public virtual bool Find( ExtractionCursor cursor, string text, ActionType failAction )
Parameters
- cursor
- Type: Facilita.Native ExtractionCursor
An ExtractionCursor object to store the success/failure of the action, and the index in the response at which the match was found.
- text
- Type: System String
The text to search for.
- failAction
- Type: Facilita.Fc.Runtime ActionType
The action to take if text cannot be found.
Return Value
true if the specified text was found in this Response; otherwise, false.Remarks
Note |
---|
The search is case-sensitive. |
Examples
Response response = request.Send(); ExtractionCursor cursor = new ExtractionCursor(); // If the text below cannot be found in the the response, then move onto the next iteration response.Find(cursor, "page loaded successfully", ActionType.ACT_NEXT_ITERATION); WriteMessage(string.Format("Text found at position {0}", cursor.Index));
See Also