![]() |
T-Plan Robot Enterprise 4.0.2 Doc
Collection |
10/06/15 |
Automation
over ADB |
Automation
over VNC |
+ The device doesn't have to
be rooted |
- DroidVNC: The device must be
rooted + VMLite VNC: The device doesn't have to be rooted |
+
No network required (only USB) |
- DroidVNC: Network connection required
(Wi-Fi) + VMLite VNC: Network or USB connection required |
+ Good support across devices
and Android OS versions |
+ Good support across devices and Android OS versions |
+ No SW installation on the
device required |
- The device must have the VNC
server installed & started |
+ Good support of the Android native keys | - Support of the Android
native keys is subject to the server vendor |
- Slower screen
refresh rate for large screen devices due to lack of image compression in the Android SDK |
+ Good screen
refresh rate for large screen devices (depends on the preferred image encoding) |
+ Support of both automatic and manual
screen rotation |
- Manual screen rotation only
supported |
+ Support of pinch & zoom gestures (Robot
3.5+/Android 4.3+) |
- No support of pinch & zoom |
<SDK_path>/tools/android
tool.
- Android 4.1 and lower: Go to Menu->Settings->Applications->Development and set on the "USB Debugging" option.
- Android 4.2 and higher:
- Go to Menu->Settings
- Select the About menu in the More or General group. On some devices it is located under Settings->About->Software->Information->More.
- Scroll to Build Number and tap it 7 times until you see a message saying “You are now a developer” or ”Developer mode has been enabled”.
- Go back to the Settings menu, select the Developer Options and turn on the slider at the top to enable the options. Then set on USB Debugging.
adb.exe
to the user or system path:adb.exe
to the beginning of the list. To separate the path from the
original value use semicolon,
';'. The new value should look like: <SDK_path>\platform-tools;<originalPaths>
"adb devices"
from the platform-tools/
folder of your Android SDK. Alternatively leave the field on "default"
to connect to the first detected device.platform-tools
folder under the Android SDK installation path.adb kill-server
adb
devices
Connect adb://default
Java test
scripts: connect("adb://default");
Connect adb://MB104PY10519
Java test
scripts: connect("adb://
MB104PY10519
");
![]() |
|
![]() |
Correct
view |
Incorrect
view Search for components using the image comparison will not work and the touch screen events will be misplaced. |
Device Action |
Computer Action |
Test Script Action |
Tap (touch) |
Left mouse click |
Call the Mouse click command (TPR scripts) or one of the mouseClick() methods (Java scripts). |
Long tap (touch) |
Long left mouse click |
Call a
sequence of Mouse press, Wait and Mouse release
commands or the corresponding Java methods. |
Swipe (drag) | Mouse drag (left button down) |
Call the Mouse drag command (TPR scripts) or one of the mouseDrag() methods (Java scripts). |
Pinch (zooming with 2 fingers) |
Pinch/zoom action |
Call the Mouse pinch/zoom command
(TPR scripts) or one of the mousePinch()
or mouseZoom()
methods (Java scripts). Supported since Robot 3.5. Requires device running Android OS 4.3 or higher. |
Back |
Right mouse click |
Call the Mouse
click btn=right command (TPR scripts) or one of the mouseRightClick()
methods (Java scripts). Alternatively use "Press Back" or press("Back"). |
_UIACLICK
variable to true
("enable") or false
("disable"). This mechanism overrides the above user preference.
It has no impacts on other test scripts executing concurrently
within the same Java process. For example, to enable it just for
one particular click use: Var _UIACLICK=true
Mouse "click"
Var _UIACLICK=false
Press Alt+Z
"
generates the Euro character on some devices. These composed
keys are subject to the device, its language and keyboard
settings and they must be explored per device.Android Device Key |
Computer/Script
Key (Action) |
Description |
BACK |
Escape, Right mouse click |
Back key. |
CALL |
PageDown |
Call key. |
CAMERA |
F6 |
Camera key. Used to launch a camera application or take pictures. |
CLEAR |
F7 |
Clear key. |
DEL |
Backspace |
Backspace key. Deletes characters before the insertion point. |
DPAD_DOWN |
Down (Arrow Down), Mouse wheel down |
Directional Pad Down key. May also be synthesized from trackball motions. |
DPAD_LEFT |
Left (Arrow Left) |
Directional Pad Left key. May also be synthesized from trackball motions. |
DPAD_RIGHT |
Right (Arrow Right) |
Directional Pad Right key. May also be synthesized from trackball motions. |
DPAD_UP | Up (Arrow Up), Mouse wheel up |
Directional Pad Up key. May also be synthesized from trackball motions. |
ENDCALL |
End |
End Call key. |
FOCUS | F5 |
Camera Focus key. Used to focus the camera. |
HOME |
Home |
Home key. This key is handled by the framework and is never delivered to applications. |
MENU |
PageUp |
Menu key. |
NOTIFICATION |
F9 |
Notification key. Used to display the list of
notifications. |
POWER |
F10 |
Power key. |
SEARCH |
F3 |
Search key. |
SOFT_LEFT |
F1 |
Soft Left key. Usually situated below the
display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom left of the display. |
SOFT_RIGHT |
F2 |
Soft Right key. Usually situated below the
display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom right of the display. |
SYM |
F8 |
Symbol modifier key. Used to enter alternate
symbols. On most devices it pops up the "Select input method" window. |
VOLUME_DOWN | F11 |
Volume Down key. Adjusts the speaker volume down. |
VOLUME_UP | F12 |
Volume Up key. Adjusts the speaker volume up. |