WebSocketMessage Find Method (ExtractionCursor, String, ActionType)C# API
Finds the specified text within this WebSocketMessage, and what action to take in case of failure.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.8.37 (1.0.0.0)
Syntax

public 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 message 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 WebSocketMessage; otherwise, false.
Remarks

Information about the success/failure of this method will be stored in the ExtractionCursor object passed.

Note Note
The search is case-sensitive.

Examples

The following example demonstrates finding text within a WebSocketMessage.
ExtractionCursor cursor = new ExtractionCursor();
if (!webSocketMessage.Find(cursor, "some text", ActionType.ACT_NONE))
{
    Warn("some text not found: " + cursor.ErrorMessage);
    NextIteration();
}

WriteMessage(string.Format("Text found at position {0}", cursor.Index));
See Also