Interact with the emulated device
Tap, type and make gestures on the emulated device from the Emulator tab, the Canvas card or the CLI.
Interacting means sending a tap, a gesture, text, a hardware button or a rotation to the chosen device.
The same commands exist in the Elyra screen and in the CLI: the tab and the Canvas card send the same
thing that tap, type and gesture send on the command line.
Prerequisites
- An emulated device active for the workspace. If none is active, the action fails asking for a target — see Mobile emulator to list and connect.
- The Emulator tab open or a Phone card on the Canvas, if you are going to interact through the screen.
Steps
- Choose the device. In the device panel, in the Emulator tab, choose the device from the list and connect; on the Canvas, choose the device from the Phone card’s list. The chosen device becomes active for the workspace, and it is the one that receives the following actions.
- Tap the screen. Click or tap on the device image in the tab, or on the Canvas card’s stream. The tap goes to the point where you tapped.
- Make a gesture. Drag on the image to scroll or swipe. In the CLI the same effect is a
gesturewith two or more points, or atapfor a single touch. - Type. From the CLI, use
typewith the text in quotes. Text with a space must be quoted: without them each word becomes a loose argument and the command is refused. - Use buttons and rotation. From the CLI,
buttonsends a hardware button androtateturns the screen to one of the four orientations. - Look at the screen after every action. The command’s reply says the command was sent, not that the device reacted the way you expected.
CLI equivalent, with the device active in the workspace:
elyra emulator tap 0.5 0.85 --jsonelyra emulator type "user@example.com" --jsonelyra emulator gesture '[{"type":"begin","x":0.5,"y":0.8},{"type":"end","x":0.5,"y":0.2}]' --jsonelyra emulator button back --jsonelyra emulator rotate landscape_left --jsonResult
- The action is sent to the chosen device, and the screen in the tab or on the Canvas card shows the effect.
- The device stays active for the workspace until you end the session.
Limits
tapcoordinates are normalised from 0 to 1, with the origin at the top-left corner — never pixels. A value outside that range is refused.typeaccepts US ASCII only. Accented text is refused; type it through the app’s own UI or send the unaccented form.- The device must be active. Without a resolved target, the command fails with
emulator_no_active. - The command’s reply does not prove the visual effect. Look at the screen after each action before deciding the next step.
- There is no screenshot in this family. On Android, the way to read the screen back is the
accessibility tree (
elyra emulator ax); on iOS that verb is refused. - For a single touch, use
tap. A two-pointgesturecan turn into a long press because of the control channel’s latency. - On Android the gesture becomes a straight drag between the first and last point: it scrolls and swipes, but it does not draw a multi-touch path.
Recovery
emulator_no_active— no active device in the workspace. Connect one in the device panel or pass--device <id>/--node "<card id or title>"in the command.emulator_device_not_found— the identifier does not exist on this machine. List withelyra emulator devices --jsonand use the id that appears.- The text was refused — check whether there is an unquoted space or a character outside US ASCII.
- The screen did not change — re-read the screen (on Android, the accessibility tree) before repeating the action; repeating blindly can apply the same action twice.