Package | src.main |
Class | public class FunFX |
Inheritance | FunFX ![]() |
Subclasses | FunFXMock |
Property | Defined by | ||
---|---|---|---|
applicationRoot : Object [read-only]
A getter method to the Application.application.root
It eases the testing
| FunFX | ||
automationManager : IAutomationManager [read-only]
A getter method to the Automation.automationManager
It eases testing
| FunFX |
Method | Defined by | ||
---|---|---|---|
FunFX(root:DisplayObject)
| FunFX | ||
applicationReady(str:String):Boolean
[static]
Checks wether the application root is ready/initialized or not
| FunFX | ||
beginRecording():void
[static]
Sets the adapter in recording mode
| FunFX | ||
catchEvent(eventType:String, eventClass:String, objectID:String, properties:Object = null):String
The method the testing framework (Ruby implemented Funfx) access to perform events.
| FunFX | ||
catchProperty(objectID:String, property:String):*
Checks the value of an objects property.
| FunFX | ||
checkComponent(parentID:String, name:String):*
Helps the Funfx framework to figure out if the
object exist in the application.
| FunFX | ||
checkName(obj:UIComponent, name:String):Boolean
Takes a display object and a name, and checks different values
on the object to see if it matches the name.
| FunFX | ||
endRecording():void
Makes the adapter leave the recording mode
| FunFX | ||
findObject(parentID:String, name:String):IAutomationObject
Uses the objectTree string, which is a comma separated
string, to go through the display object hierarchy to find the wanted object.
| FunFX | ||
getChildren(objectID:String):String
Helper method for displaying the children of a component
Is used to ease writing tests, finding the right children
| FunFX | ||
getColumnNames(objectID:String):String
Returns the column names of a component supporting
tabular data e.g.
| FunFX | ||
getFirstVisibleRow(objectID:String):int
Returns the index of the first visible row in a component supporting
tabular data e.g.
| FunFX | ||
getHierarchy(obj:IAutomationObject):String
[static]
Prints the hierarchy of parent to the object in Ruby syntax.
| FunFX | ||
getLastVisibleRow(objectID:String):int
Returns the index of the last visible row in a component supporting
tabular data e.g.
| FunFX | ||
getNumColumns(objectID:String):int
Returns the number of columns in a component supporting
tabular data e.g.
| FunFX | ||
getNumRows(objectID:String):int
Returns the number of rows in a component supporting
tabular data e.g.
| FunFX | ||
getTabularDataValue(objectID:String, arg:Object):String
| FunFX | ||
getTabularDataValues(objectID:String, start:int = 0, end:int = 0):String
Extracts and passes the values of an object that supports
tabulardata (ex DataGrid, List etc) to the testing framework.
| FunFX | ||
init(root:DisplayObject):void
[static]
Init method that initializes the adapter class when added as a library to
a Flex application.
| FunFX | ||
isSynchronized(objectID:String):Boolean
Method that checks whether the Flex application is ready or busy doing some action.
| FunFX | ||
resolveObjFromID(objectID:String):UIComponent
Method that resolves the object from the cerated ID
| FunFX | ||
setProperties(replayEvent:*, object:UIComponent, properties:Object):String
Merges the properties added by the framework to the actual event
| FunFX | ||
setTestingEnvironment(te:String):void
Sets the testing environment, with a XML file that describes all the
Flex components.
| FunFX |
Method | Defined by | ||
---|---|---|---|
createID(obj:IAutomationObject):String
A help method to create the ID for the object.
| FunFX | ||
performSearch(openList:Array, name:String):UIComponent
Uses a breadth first algorithm to find the object.
| FunFX | ||
resolveID(objectID:String):Array
Helper method for resolving the object from the ID.
| FunFX | ||
startPlayback(obj:IAutomationObject, ev:Event):void
Initiates the event on the object.
| FunFX | ||
startSearch(name:String):UIComponent
A helper method that is used to find the first display object from
the System manager.
| FunFX |
applicationRoot | property |
applicationRoot:Object
[read-only]A getter method to the Application.application.root It eases the testing
Implementation protected function get applicationRoot():Object
automationManager | property |
automationManager:IAutomationManager
[read-only]A getter method to the Automation.automationManager It eases testing
Implementation protected function get automationManager():IAutomationManager
FunFX | () | constructor |
public function FunFX(root:DisplayObject)
Parameters
root:DisplayObject |
applicationReady | () | method |
public static function applicationReady(str:String):Boolean
Checks wether the application root is ready/initialized or not
Parametersstr:String — With ExternalInterface the method must provide some arguement
|
Boolean — A Boolean value indicating if the application is ready or not
|
beginRecording | () | method |
public static function beginRecording():void
Sets the adapter in recording mode
catchEvent | () | method |
public function catchEvent(eventType:String, eventClass:String, objectID:String, properties:Object = null):String
The method the testing framework (Ruby implemented Funfx) access to perform events. It receives the object and the event that will be performed on the object. It creates the event and if the properties argument is set, it uses the method setProperties to merge the properties of the event. The event and object is sent to the method startPlayback.
ParameterseventType:String — The event eg. flash.events::MouseEvent
|
|
eventClass:String — The type of event eg. Click
|
|
objectID:String — The id of the object, String/AutomationID
|
|
properties:Object (default = null ) — The properties of the event, an XML object
|
String — The error message if one is created, or null if the replay was successfull.
|
See also
catchProperty | () | method |
public function catchProperty(objectID:String, property:String):*
Checks the value of an objects property.
ParametersobjectID:String — The id of the object, String/AutomationID
|
|
property:String — the property of an object the framework wants to check its value
|
* — the value of the property
|
See also
checkComponent | () | method |
public function checkComponent(parentID:String, name:String):*
Helps the Funfx framework to figure out if the object exist in the application. Uses the methods findObject and createID.
ParametersparentID:String — The id of the object, String/AutomationID
|
|
name:String |
* — A boolean value indicating if the object exists or not
|
See also
checkName | () | method |
public function checkName(obj:UIComponent, name:String):Boolean
Takes a display object and a name, and checks different values on the object to see if it matches the name.
Parametersobj:UIComponent — The display object
|
|
name:String — The name of the desired display object
|
Boolean — Indicating that the display object is correct or not
|
createID | () | method |
protected function createID(obj:IAutomationObject):String
A help method to create the ID for the object. It is created to ease testing.
Parametersobj:IAutomationObject — The display object
|
String — The id created with the help from AutomationID
|
See also
endRecording | () | method |
public function endRecording():void
Makes the adapter leave the recording mode
findObject | () | method |
public function findObject(parentID:String, name:String):IAutomationObject
Uses the objectTree string, which is a comma separated string, to go through the display object hierarchy to find the wanted object. It uses the methods startSearch and performSearch to achieve this goal.
ParametersparentID:String — The id of the parent object, String/AutomationID
|
|
name:String — The name of the object
|
IAutomationObject — The object found, if noe object found it returns null
|
See also
getChildren | () | method |
public function getChildren(objectID:String):String
Helper method for displaying the children of a component Is used to ease writing tests, finding the right children
ParametersobjectID:String — The id of the object, String/AutomationID
|
String — A String showing all the children with names.
|
See also
getColumnNames | () | method |
public function getColumnNames(objectID:String):String
Returns the column names of a component supporting tabular data e.g. datagrid, list, combobox
ParametersobjectID:String — The id of the object, String/AutomationID
|
String — The column names
|
See also
getFirstVisibleRow | () | method |
public function getFirstVisibleRow(objectID:String):int
Returns the index of the first visible row in a component supporting tabular data e.g. datagrid, list, combobox
ParametersobjectID:String — The id of the object, String/AutomationID
|
int — The index of the first visible row
|
See also
getHierarchy | () | method |
public static function getHierarchy(obj:IAutomationObject):String
Prints the hierarchy of parent to the object in Ruby syntax. It will be used together with the FunFX recording tool. This method is only created, so that the adapter is partly ready for the recording tool.
Parametersobj:IAutomationObject — IAutomationObject recorded
|
String — A string representing the hierarchy
|
getLastVisibleRow | () | method |
public function getLastVisibleRow(objectID:String):int
Returns the index of the last visible row in a component supporting tabular data e.g. datagrid, list, combobox
ParametersobjectID:String — The id of the object, String/AutomationID
|
int — The index of the last visible row.
|
See also
getNumColumns | () | method |
public function getNumColumns(objectID:String):int
Returns the number of columns in a component supporting tabular data e.g. datagrid, list, combobox
ParametersobjectID:String — The id of the object, String/AutomationID
|
int — The number of columns
|
See also
getNumRows | () | method |
public function getNumRows(objectID:String):int
Returns the number of rows in a component supporting tabular data e.g. datagrid, list, combobox
ParametersobjectID:String — The id of the object, String/AutomationID
|
int — The number of rows
|
See also
getTabularDataValue | () | method |
public function getTabularDataValue(objectID:String, arg:Object):String
Parameters
objectID:String |
|
arg:Object |
String |
getTabularDataValues | () | method |
public function getTabularDataValues(objectID:String, start:int = 0, end:int = 0):String
Extracts and passes the values of an object that supports tabulardata (ex DataGrid, List etc) to the testing framework. One can choose what rows/columns or 0,0 to choose all.
ParametersobjectID:String — The id of the object, String/AutomationID
|
|
start:int (default = 0 ) — The start column/row
|
|
end:int (default = 0 ) — The end column/row
|
String — The tabular values in a comma separated list.
|
See also
init | () | method |
public static function init(root:DisplayObject):void
Init method that initializes the adapter class when added as a library to a Flex application.
Parametersroot:DisplayObject — The Flex application
|
isSynchronized | () | method |
public function isSynchronized(objectID:String):Boolean
Method that checks whether the Flex application is ready or busy doing some action.
ParametersobjectID:String — The id created by AutomationID describing the object
|
Boolean — Boolean value indicating if the application is synchronized
|
See also
performSearch | () | method |
protected function performSearch(openList:Array, name:String):UIComponent
Uses a breadth first algorithm to find the object. The closest objects are put in an openlist and the investigated items that are not the one searched for are put in a closed list. It moves down in the hierarchy until the object is found. The method checkName is used to see if the object is correct or not.
ParametersopenList:Array — The list of objects not investigated
|
|
name:String — The name of the object
|
UIComponent — The object found, or null if not found.
|
See also
resolveID | () | method |
protected function resolveID(objectID:String):Array
Helper method for resolving the object from the ID. Made to ease testing.
ParametersobjectID:String — The id of a object created with mx.automation.AutomationID
|
Array — Array
|
See also
resolveObjFromID | () | method |
public function resolveObjFromID(objectID:String):UIComponent
Method that resolves the object from the cerated ID
ParametersobjectID:String — The id of the object, String/AutomationID
|
UIComponent — The object resolved from the ID.
|
See also
setProperties | () | method |
public function setProperties(replayEvent:*, object:UIComponent, properties:Object):String
Merges the properties added by the framework to the actual event
ParametersreplayEvent:* — The event that will be replayed
|
|
object:UIComponent — The object the event will be performed on
|
|
properties:Object — The event properties, an XML object
|
String — The error message, if one is created, or null if it was successful.
|
setTestingEnvironment | () | method |
public function setTestingEnvironment(te:String):void
Sets the testing environment, with a XML file that describes all the Flex components. It uses the private method xmlLoaded and the classes created by Adobe.
Parameterste:String — Testing environment filename
|
startPlayback | () | method |
protected function startPlayback(obj:IAutomationObject, ev:Event):void
Initiates the event on the object.
Parametersobj:IAutomationObject — The display object on which the event is performed on
|
|
ev:Event — The event to be performed
|
startSearch | () | method |
protected function startSearch(name:String):UIComponent
A helper method that is used to find the first display object from the System manager. After the first object is discovered, it uses the performSearch method to locate the next objects
Parametersname:String — The name of the object
|
UIComponent — The object found or null
|
See also