Flex APIs

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

_flex

Since: Sahi ProSahi OSSahi Pro StarterDesktop Add-OnMobile Add-On
3.5NA7.0.1NANA

Available for modes: Browser

_flex($identifier)

Arguments
$identifierstring id of flex object

Returns
objectFlex 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 ProSahi OSSahi Pro StarterDesktop Add-OnMobile Add-On
3.6NA7.0.1NANA

Available for modes: Browser

_f($identifier)

Arguments
$identifierstring id of flex object

Returns
objectFlex 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 ProSahi OSSahi Pro StarterDesktop Add-OnMobile Add-On
4.0NA7.0.1NANA

Available for modes: Browser

_setFlexReadyCondition($fn)

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

Returns
null

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>