WebSocketMessage VerifyContains Method (String, ActionType)C# API
Determines whether the content of this WebSocketMessage contains the specified text, and specifying what action to take in case of failure.

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

public bool VerifyContains(
	string text,
	ActionType failAction
)

Parameters

text
Type: System String
The text to look for.
failAction
Type: Facilita.Fc.Runtime ActionType
The action to take if the text cannot be found.

Return Value

true if the text was found; otherwise, false.
Examples

The following example demonstrates verifying that a string appears within the content of a message.
// Check that the login succeeded. 
if (!webSocketMessage.VerifyContains("Login successful", ActionType.ACT_ERROR))
{
    NextIteration();
}
See Also