Cogitek RIATest 3 Documentation Copyright © Cogitek Inc.

Operators

RIAScript support the 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 the application.

Locator execution => 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 the enabled property is true.

Operator => has a 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);

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


Found a typo? Have a suggestion? Please submit your request here.