VerifyValue Method (DynamicText StaticText TextField)

Class

DynamicText, StaticText, and TextField.

Action

Verifies the text of the text field.

Syntax

object.VerifyValue(sExpected[, nTimeout])
Variable Description
sExpected The text you expect the static text or text box to contain. STRING or LIST OF STRING.
nTimeout Optional: The number of seconds to wait for the expected value to be achieved. NUMBER.

Notes

Use the VerifyValue method to check whether a text box has the text string you expect it to have. For a dynamic text, static text, or single-line text box, sExpected should be a STRING. For a multi-line text box, sExpected should be a LIST OF STRING.

Calling this method is the same as calling the Verify function in the following manner:
Verify(window.GetText(), expected_text)

If the text in the static text or text box does not match the expected value, Silk Test Classic raises the exception E_VERIFY.

If a timeout is specified with the nTimeout parameter, Silk Test Classic calls VerifyValue() until the condition is verified or the timeout is reached. The time between checks is the value of the window retry interval Agent option, OPT_WINDOW_RETRY. If the verification fails, an exception is thrown.

Example

MessageBox.Message.VerifyValue("Line Number out of range")