Reference to GUI interface functions
- Namespace
-
As to 'namespace' the following initialisation code is assumed :
local testIup = require('btd.lua.testiup')()and for the robot :local IupRobot = require('btd.lua.iuprobot') local robot = IupRobot() -- default values for update and wait timesand finally for the sequencer :local GuiSequencer = require('btd.lua.guisequencer') local seq = GuiSequencer() - Functions
testIup.iupLoop(func)-
If
funcis not a function (or nil) then the GUI under test will run completely, but will exit it's main loop the first time idle time processing is called. If it is a function the GUI under test will keep running it's main loop and do it's idle time processing (if any) followed byfunc. The test must be terminated by thefunc. robot.demo = true/false- Flag to enable demo mode.
robot:leftDown()- Press left mouse button.
robot:leftUp()- Release left mouse button.
robot:leftClick(time)- Click left mouse button during the specified time.
robot:leftClickDbl(time)- Double click left mouse button during the specified time.
robot:middleDown()- Press middle mouse button.
robot:middleUp()- Release middle mouse button.
robot:middleClick(time)- Click middle mouse button during the specified time.
robot:middleClickDbl(time)- Double click middle mouse button during the specified time.
robot:rightDown()- Press right mouse button.
robot:rightUp()- Release right mouse button.
robot:rightClick(time)- Click right mouse button during the specified time.
robot:rightClickDbl(time)- Double click right mouse button during the specified time.
robot:goto(x,y,time)- Move cursor from current to desired position in the specified time.
robot:gotoCenter(IupElement,time)- Move cursor from current position to the center of the IUP element in the specified time.
robot:keyDown(key)- Press the specified printable key.
robot:keyUp(key)- Release the specified printable key.
robot:keyClick(key,time)- Click the specified printable key during the specified time.
robot:keyString(string)- Click all printable keys in the specified string.
robot:funcDown(key)- Press the specified functional key.
robot:funcUp(key)- Release the specified functional key.
robot:funcClick(key,time)- Click the specified functional key during the specified time.
robot:altDown(key)- Press the alt key.
robot:altUp(key)- Release the alt key.
robot:ctrlDown(key)- Press the control key.
robot:ctrlUp(key)- Release the control key.
robot:shiftDown(key)- Press the shift key.
robot:shiftUp(key)- Release the shift key.
robot:timer(time)- Wait the specified time.
seq.step- Active step.
seq.ok- Active step has finished.
seq:append({function,parameters},...)- Append the specified functions to the sequencer.
seq:append({override,function,parameters},...)-
Append the specified functions to the sequencer, overriding
the standard (
false) step condition. seq:execute()- Execute all steps in the sequencer.
- See examples in test directories
