RIATest 2 Documentation Copyright © RIATest.com

Operators

RIAScript support standard set of arithmetic, logical, relational and conditional operators. In addition to these standard operator RIAScript defines 3 special operators: locator compose ->, locator execution => and waitfor operators.

Locator compose -> operator

Locator compose operator -> is used for composing multipart locators, e.g.:

FlexApplication("myapp")->FlexButton("login");

The above code defines a locator that will match a button which is placed directly within application.

Locator exectution => operator

Locator execution operator => is used for executing component actions and accessing component properties, e.g.:

FlexButton("login")=>click();
verifyEqual(FlexButton("login")=>enabled, true);

The above code will execute a click action on a button and then will verify that the value of enabled property is true.

Operator => has lower precedence than operator -> thus the following code is valid:

FlexApplication("myapp")->FlexButton("login")=>click();

The waitfor operator

The waitfor oeprator has the following syntax:

waitfor(condition);

waitfor operator will evalute the condition continuously until it becomes true or until timeout. The timeout by default is 30 seconds and can be changed using setTimeout global function. The result of waitfor expression is true if condition was or became true and false if wait is timed out.