Just a blog to share my tricks, code snippets

Showing posts with label mobile automation. Show all posts
Showing posts with label mobile automation. Show all posts

Friday, June 2, 2017

Appium Desktop has been released


Appium Desktop has been released for a while. This article is a brief introduction for this new app. Appium Desktop is a new open source app for Windows, Mac and Linux which is a GUI interface for using appium and inspecting your app's elements. Please be noticed that Appium Desktop is not the same as Appium. It is a combination of Appium with graphical interface and other tools.

Some cons of Appium Desktop:

  • Has GUI for Appium Server. You are able to set options, set ports, set path for logs,...Launching sessions is also possible without running code.
  • An inspector mechanism is added to inspect you app's structure without running other apps. You can also perform basic actions on it like tapping or sending keys.
  • Running faster than the old Appium GUI app. 
  • Able to work with Appium 1.6.0 or more.
  • No need to install via NPM. Installation is done just by downloading the exe/dmg/zip file.


Download: 
You can download it from this page. Currently, the latest one is 1.0.2-beta.2. Auto update is also provided whenever there is a newer version available.

Usage:

  • Start server: 

We can start a simple server or advanced option server.



  • Start session:

After starting the server, we will go to the server console output window which allows starting a new session or stopping the server. You can also get the server in this console windows instead of the log file which is configurable during starting server with advanced options.


  • New Session windows:

The New Session window allows you to construct a set of Appium desired capabilities used to launch an Appium session.

  • Inspector:

After the session is started, you are able to inspect your app's structure.

For more information about Appium Desktop, please visit its official github page. You can also check out this video


Friday, March 10, 2017

Some useful adb commands with Android emulators using in mobile automation


Please be notice that below commands are for windows.

  • Manually install the app to the emulator:

adb install path_to_apk
For example:
adb install D:\abc\newapp\VSee-vsee-release.apk
If you have more than 1 emulators, use option 's' to specify the device
>adb devices
List of devices attached
emulator-5554 device
emulator-5555 device

>adb -s emulator-5555 install helloWorld.apk
Note: If you issue a command without specifying a target device when multiple devices are available, adb generates an error.

  • Take a screenshot:

adb shell screencap path_to_save_screenshot
For example:
adb shell screencap /sdcard/screen.png

  • Copy files to/from a device:

To copy a file or directory and its sub-directories from the device
adb pull remote local
For example:
adb pull /sdcard/screen.png .
To copy a file or directory and its sub-directories to the device, do the following:
adb push local remote
For example:
adb push foo.txt /sdcard/foo.txt

For all the adb command, you should check out the Android developer page at HERE