Package com.axway.ats.uiengine.engine
Class RobotEngine
- java.lang.Object
-
- com.axway.ats.uiengine.internal.engine.AbstractEngine
-
- com.axway.ats.uiengine.engine.RobotEngine
-
public class RobotEngine extends AbstractEngine
Engine able to send keyboard and mouse system commands using Java Robot
-
-
Field Summary
-
Fields inherited from class com.axway.ats.uiengine.internal.engine.AbstractEngine
elementsFactory, uiDriver
-
-
Constructor Summary
Constructors Constructor Description RobotEngine(RobotDriver robotDriver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclickAt(int x, int y)Move the mouse at (X,Y) screen position and then click the mouse button 1voidkeyPress(int keyCode)Presses a given key.voidkeyRelease(int keyCode)Releases a given key.voidpressAltF4()Press Alt + F4 keysvoidpressEsc()Press the Escape keyvoidtype(int... keyCodes)Type some keys defined in java.awt.event.KeyEventvoidtype(String text)Type some textvoidtype(String text, int... keyCodes)Type some text but combine them with some keys defined in java.awt.event.KeyEvent
It first presses the special key codes(for example Alt + Shift), then it types the provided text and then it releases the special keys in reversed order(for example Shift + Alt )voidtypeEnter()Type the ENTER keyvoidtypeSpace()Type the SPACE keyvoidtypeTab()TAB oncevoidtypeTab(int numberOfTabs)TAB a number of times-
Methods inherited from class com.axway.ats.uiengine.internal.engine.AbstractEngine
getMapSection, loadMapFile, setMapSection
-
-
-
-
Constructor Detail
-
RobotEngine
public RobotEngine(RobotDriver robotDriver)
-
-
Method Detail
-
clickAt
public void clickAt(int x, int y)Move the mouse at (X,Y) screen position and then click the mouse button 1- Parameters:
x- the X coordinatey- the Y coordinate
-
type
public void type(String text)
Type some text- Parameters:
text- the text to type
-
type
public void type(int... keyCodes)
Type some keys defined in java.awt.event.KeyEvent- Parameters:
keyCodes- the special key codes
-
type
public void type(String text, int... keyCodes)
Type some text but combine them with some keys defined in java.awt.event.KeyEvent
It first presses the special key codes(for example Alt + Shift), then it types the provided text and then it releases the special keys in reversed order(for example Shift + Alt )- Parameters:
text- the text to typekeyCodes- the special key codes
-
typeTab
public void typeTab()
TAB once
-
typeTab
public void typeTab(int numberOfTabs)
TAB a number of times- Parameters:
numberOfTabs- how many tabs
-
typeEnter
public void typeEnter()
Type the ENTER key
-
pressEsc
public void pressEsc()
Press the Escape key
-
pressAltF4
public void pressAltF4()
Press Alt + F4 keys
-
typeSpace
public void typeSpace()
Type the SPACE key
-
keyPress
public void keyPress(int keyCode)
Presses a given key. The key should be released using the keyRelease method.- Parameters:
keyCode- Key to press (e.g.KeyEvent.VK_A)
-
keyRelease
public void keyRelease(int keyCode)
Releases a given key.- Parameters:
keyCode- Key to release (e.g.KeyEvent.VK_A)
-
-