Info |
---|
This page concerns only measure on android device, if you want to measure on iphoneiPhone, you can follow this link: Lancer un script gdsl avec le testrunner sur iOS (sans mesure physique) |
With UIAutomatorViewer (recommanded)
...
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
1. Install UIAutomatorViewer
Install Android Studio if you don’t have it
Open Android Studio
Click on More Actions > SDK Manager (or Tools > SDK Manager if a project is open)
Click on the SDK tools tab, uncheck option "Hide Obsolete Packages"
Check option “Android SDK Tools” and install version 26.1.1
UIautomatorviewer is now installed in Android SDK directory
Default path for linux :
$HOME\Android\Sdk\tools\bin
Default path for mac :
$HOME/Library/Android/sdk/tools/bin
Default path for windows :
...
Note |
---|
UIAutomatorviewer need needs a JDK 1.8 by default to work |
...
2. Launch UIAutomatorViewer
2.1. Launch UIAutomatorViewer without installing a JDK 1.8 (recommended)
To avoid installing a different version of java, you could : set environment variables for your PC profile
...
Default path for windows
...
:
Linux | Mac | Windows | |
---|---|---|---|
ANDROID_HOME |
add this variable to precise the path on the sdk android
Edit the ~/.bashrc file:
| Edit the ~/.bashrc_profile file: | Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:
|
|
c:\Program Files\Android\Android Studio\jbr
ifReplace username by the name of the user. |
JAVA_HOME |
add this variable to set the path to the JDK. you can use the jdk installed by android studio
Edit the ~/.bashrc file:
If jbr is not present (old version Android Studio |
) replace by jre |
. | Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:
|
If jbr is not present (old version Android Studio |
) replace by jre |
. |
PATH |
Complete the path by adding the path to directory containing the java executable.
Do not replace PATH value, only add new entry
%JAVA_HOME%\bin
Edit the ~/.bashrc file:
| Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:
|
After adding the variables, you can open a new terminal (this is important to open a new terminal to take into account the variable you have just set) and use the following command to open uiautomatorviewer :
...
The following program appears :
...
...
2.2. Launch UIAutomatorViewer with JDK 1.8
Note |
---|
Could It could be difficult to have the good jdk version to work with your sdk |
...
On Windows, install Java 8 by getting it on Oracle site web, need to create an account
On Linux, on a new terminal, go to the directory “$HOME
$HOME/Android/Sdk/tools/
bin”bin
and tap the following command :
...
On Windows, on a new terminal, go to the directory “C
C:\Users\[username]\AppData\Local\Android\Sdk\tools\
bin”bin
and tap the following command:
...
The following program appears :
...
...
3. Use UIAutomatorviewer
when When UIAutomatorviewer is opened, you can
...