performAction
See Action API. Executes a series of action functions provided as arguments.
performAction(actionFunction, actionFunction, ...)
#
ParametersactionFunction
: Functions that compose an action. These functions don't do anything on their own besides returning amap
containing just one entry, having their name askey
and arguments aslist
. That's why these functions has to be used only as arguments toperformAction
. Following lists all action functions:focus(elemId)
: Focuses on the given element.shiftDown()
: Depresses theshift
key.shiftUp()
: Releases theshift
key.ctrlDown()
: Depresses thectrl
key.ctrlUp()
: Releases thectrl
key.cmdDown()
: Depresses thecmd
key.cmdUp()
: Releases thecmd
key.cmdCtrlDown()
: Special function that work acrossplatform
s. If a part of your app usecmd
in Mac butctrl
in Windows, you can use this function. It will detect currentplatform
and depress one of the key.cmdCtrlUp()
: Similar to it's counterpartcmdCtrlDown
and releases one of the key depending on currentplatform
.altDown()
: Depresses thealt
key.altUp()
: Releases thealt
key.sendKeys(keys, keys, ...)
: Sends the given keys to currently focused element. Don't use it for sending modifier keys, use dedicated functions such asshiftDown()
.move(elemId)
: Moves pointer to the center of given element.move(elemId, x, y)
: Moves pointer to an offset ofx, y
from the center of given element.x
: Anumber
. Offset in x axis in pixels, can be negative.y
: Anumber
. Offset in y axis in pixels, can be negative.
move(x, y)
: Moves pointer to an offset ofx, y
from it's current position.x
: Anumber
. Offset in x axis in pixels, can be negative.y
: Anumber
. Offset in y axis in pixels, can be negative.
hold()
: Holds the pointing device on current element (such as depressing left button of a desktop mouse).releases()
: Releases the pointing device (such as releasing left button of a desktop mouse).clickOnce()
: Clicks on current element. Note theOnce
suffix used to distinguish it fromclick
.doubleClick()
: Clicks on current element twice.contextClick()
: Right clicks on current element.pause(milliseconds)
: Pauses execution for the given amount of time inmilliseconds
.
#
Returns- No value