Skip to content

API documentation

Daniel Bunte edited this page Feb 18, 2016 · 4 revisions

clickAtPosition - (x:int, y:int)

Clicks on the specified position on screen

clickObject - (name:String)

Clicks on the specified object, if it can be found by the name. Use FullyQualifiedIdentifiers like "myObject.child.button" or array access, like "[0][1][0]

countObjectsOnStage - ()

Counts all objects on parentContainer recursively and returns that number.

findObjectByName - (name:String, properties:String|Array)

Tries to find an object by the given name, or array access (same as for clickObject). The properties argument works the same like with getObjectTree or other methods.

getAllObjectsAndProperties - ()

Returns all objects that are currently on parentContainer. Will include all properties. Please note that this method can be very slow, due to the amount of data created.

getAllObjects - ()

Returns all objects that are currently on parentContainer. This method is not recursive!

getObjectAtPosition - (x:int, y:int)

Returns the object at the given location.

getObjectProperty - (objectName:String, propertyName:String)

Returns the specified property of the given object name (can also be array access). Please note that this will only work for primitive types like String, int, etc.

getObjectTree - (properties:String|Array)

Returns a representation of the tree structure of the current display object hierarchy. The properties argument can be set to "all", to retrieve all available properties, or set to an array that contains the properties that should be retrieved, like ["x", "y", "width", "height"]

help - ()

Prints this help documentation.

setFormatter - (formatter:String)

Sets the formatter type for return values. For now, JSON and XML are supported. Any subsequent calls to methods will return their values with the current formatted.

setObjectProperty - (objectName:String, propertyName:String, value:*)

Let's you modify any given property of the given object. You could, for instance, change the .text property of a TextField, to change it's content. The type of the value is dependent on the property you're about to change.

toggleHighlight - (objectName:String)

Will toggle the highlighting of the given element name (can also be array access). If switched on, the highlight will be illuminated with a magenta glow.

toggleHighlightUnderCursor - ()

Will toggle the highlighting of elements that are currently under the cursor and are clickable. Will also print the FQI (FullyQualifiedIdentifier) to console.

toggleCursorPosition - ()

Will toggle printing the current cursor position to console.