Mobile Device Control
This section explains how mobile device controls correspond to Eggplant Functional’s mouse and keyboard events.
Controlling the Mobile Device Manually
When you are manually controlling your mobile device through Eggplant Functional, you can generate most keystrokes by pressing the corresponding computer key. For example, when you press the "m" key on your computer keyboard, an "m" keystroke is produced on the device.
Controlling the Mobile Device in a Script
Device-Specific Keys
For the controls that are not present on a computer keyboard, such as the trackball and Menu key, Eggplant Functional (EPF) substitutes a computer key. (For example, Keypad +
represents the Volume up button. To engage the device’s Volume up button, you press the + key on your computer keypad.) There are SenseTalk keywords tied to these keys. Specific device key mappings are shown in TypeText Keywords for Mobile Control.
Touch-Screen Controls
In Eggplant Functional, you can produce a device’s touch-screen actions with mouse movements and clicks. When the mouse button is pressed, the device registers your finger on the screen at the same point as the mouse cursor. When the mouse button is up, mouse cursor movements have no effect on the device cursor.
Automating Device Keystrokes with TypeText
In Eggplant Functionalscripts, the TypeText command generates keystrokes. These keystrokes include character keystrokes, such as letters, and "functional" keystrokes, such as the Escape key.
Typing Characters
To produce text on the device, use the TypeText command with a quoted text string.
Example
TypeText "3140 Main Street" //Types this text on the device.
Pressing Functional Keys
Each functional key has an assigned keyword to use with the TypeText command. To produce functional keystrokes on the device, use the TypeText command with the corresponding keyword.
Example
TypeText DownArrow //Sends a down arrow keystroke, which corresponds to the device's "trackball down" action.
Example
TypeText AltKey, "d" //Holds the AltKey, and sends a d keystroke.
Recording TypeText Statements
In the Viewer window, you can create TypeText statements by recording your keystrokes and Mobile Button clicks.