Sahi Pro - Flex APIs

abstract Sahi supports Flex applications via the Sahi Flex Library (SFL)
Information on usage can be found here

_flex

Since Sahi Pro: 3.5
Since Sahi OS: NA

_flex($identifier)

Arguments
$identifierstring id of flex object

Details

Returns a handle to the flex object. All child elements of the flex object are accessed from this handle.

_setValue(_flex("mxComponents").textinput("txt1"), "English");

info_flex is the same as _f
Information on usage can be found here

_f

Since Sahi Pro: 3.6
Since Sahi OS: NA

_f($identifier)

Arguments
$identifierstring id of flex object

Details

info_f is the same as _flex
Returns a handle to the flex object. All child elements of the flex object are accessed from this handle.

_setValue(_f("mxComponents").textinput("txt1"), "English");
Information on usage can be found here

_setFlexReadyCondition

Since Sahi Pro: 4.0
Since Sahi OS: NA

_setFlexReadyCondition($fn)

Arguments
$fnfunction Function which evaluates to true/false. Function denotes when the flex app is considered to be ready for Sahi.

Details

This function should be used inside a browser tag. The $fn is called for each flex app on the browser, and the current flex app is passed as an argument to fn.

In some flex apps with lots of dynamically loading parts, it may be customary to show a rotating icon with "Loading..."
or some such message. Sahi can be told to wait till this message disappears.

At the start of your script add this:
<browser>
_setFlexReadyCondition(function(fl){
  return !_isVisible(fl.uitextfield("Loading..."));
});
</browser>