Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
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
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printabletrue

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

...

:

c

Linux

Mac

Windows

ANDROID_HOME

add this variable to precise the path on the sdk android

Edit the ~/.bashrc file:

export ANDROID_HOME=$HOME/Android/Sdk

Edit the ~/.bashrc_profile file:

Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:

C:\Users\

USER

[username]\AppData\Local\Android\Sdk

$HOME\android\sdk

c:\Program Files\Android\Android Studio\jbr

if

Replace 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:

export JAVA_HOME=$HOME/android-studio/jbr

If jbr is not present (old version Android Studio

,

) replace by jre

)$HOME\android-studio

.

Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:

C:\Program Files\Android\Android Studio\jbr

if

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:

export PATH=$JAVA_HOME/bin:$PATH

Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:

$JAVA_HOME\bin

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 “CC:\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

...