April 3, 2017

Webinar Notes: An Introduction to Appium Desktop by Johnathan Lipps

About the Webinar


From Sauce Labs: An Introduction to Appium Desktop (3/29/2017):

"Appium Desktop is a new graphical interface for starting an Appium server and inspecting your app's structure via Appium. It's recently been developed by the Appium contributors at Sauce Labs and is currently in open beta. In this webinar we will take you on a tour of Appium Desktop and show how it can be used with the goal of making it easier to write tests for your apps.

"Join Jonathan Lipps, Appium project lead committer and Director of Open Source for Sauce Labs, as he covers the following topics:
  • "Finding, downloading, and installing Appium Desktop for your platform
  • "Starting an Appium server with both simple and advanced options
  • "Interpreting Appium server log output
  • "Starting an inspector session using just Appium Desktop's server
  • "Starting an inspector session using Sauce Labs or TestObject
  • "Troubleshooting and where to go for help
  • "Appium Desktop's roadmap"
Video: An Introduction to Appium Desktop (55 minutes) https://youtu.be/IOSUBda2-g4

Slides: Introducing Appium Desktop:



Who is Johnathan Lipps?

According to his LinkedIn profile, as Director of Open Source at Sauce Labs: "I lead open source strategy, developer advocacy, and technological evangelism for the world's largest test cloud. In addition to ensuring the open source testing ecosystem is healthy, I lead development of Appium, the mobile automation framework, enabling a whole new level of automated testing for mobile devices and beyond".

...also according to LinkedIn: "I'm a software developer, a passionate leader, a linguist, a philosopher, a writer, a musician, a rock climber, and a runner".

Project Lead for the Appium project.


Johnathan Lipps metioned that Appium is Sauce Labs' biggest project, and have been working on it for quite some time. "Appium is the cross-platform solution for native, web, and hybrid mobile automation." With it, you can automate tests the apps you care about.

The main product in the Appium toolset is the Appium server, an invisible piece of software, installed by the Node Package Manager (npm) that sits on top of Node.JS.

The Appium server runs as a server on your machine, remotely, or in the cloud, such as with Sauce Labs, "enabling you to send requests for sessions, and within those sessions to send automation commands to [...] tell your device to do things".

The Appium Desktop (new!) is a point-and-click interface for using appium and inspecting your app's structure. The inspector helps you find web elements such as a button so you can then make an assertion. It is basicallt a wrapper for Appium.

Launch the desktop app, which provides a GUI for the exact same messages you would see in the command line. There used to be appium.app and appium.exe where you could also use Appium with a point-and-click interface. They were good applications that fell by the wayside. Appium Desktop is a "spiritual successor".


Differences Between Appium Command Line Interface (CLI) and Appium Desktop:


From Introducing Appium Desktop

Download and Install Appium Desktop

Appium Desktop is at https://github.com/appium/appium-desktop/releases

You can choose to adjust the port or the host if you need, and you start a simple server.
You can also select "Advanced" and play around with various options.

Make sure to read the documentation, since this will change how Appium behaves.

You can run from:

  • Automatic Server
  • Custom Servers
  • Sauce Labs
  • Test Object


You can also set Desired Capabilities such as platformName : iOS.

What are Desired Capabilities?


"Desired capabilities are a set of keys and values (i.e., a map or hash) sent to the Appium server to tell the server what kind of automation session we’re interested in starting up. There are also various capabilities which can modify the behavior of the server during automation. For example, we might set the platformName capability to iOS to tell Appium that we want an iOS session, rather than an Android or Windows one. Or we might set the safariAllowPopups capability to true in order to ensure that, during a Safari automation session, we’re allowed to use JavaScript to open up new windows". - Appium API Reference

If you have a huge set of Desired Capabilities you can edit in the GUI of Appium Desktop and see it in the JSON object that the Appium will interpret.

Appium server capabilities

automationNameWhich automation engine to useAppium (default) or Selendroid
platformNameWhich mobile OS platform to useiOSAndroid, or FirefoxOS
platformVersionMobile OS versione.g., 7.14.4
deviceNameThe kind of mobile device or emulator to useiPhone SimulatoriPad SimulatoriPhone Retina 4-inchAndroid EmulatorGalaxy S4, etc…. On iOS, this should be one of the valid devices returned by instruments with instruments -s devices. On Android this capability is currently ignored, though it remains required.
appThe absolute local path or remote http URL to an .ipa or .apk file, or a .zip containing one of these. Appium will attempt to install this app binary on the appropriate device first. Note that this capability is not required for Android if you specify appPackage and appActivity capabilities (see below). Incompatible with browserName./abs/path/to/my.apk or http://myapp.com/app.ipa
browserNameName of mobile web browser to automate. Should be an empty string if automating an app instead.'Safari’ for iOS and 'Chrome’, 'Chromium’, or 'Browser’ for Android
newCommandTimeoutHow long (in seconds) Appium will wait for a new command from the client before assuming the client quit and ending the sessione.g. 60
language(Sim/Emu-only) Language to set for the simulator / emulatore.g. fr
locale(Sim/Emu-only) Locale to set for the simulator / emulatore.g. fr_CA
udidUnique device identifier of the connected physical devicee.g. 1ae203187fc012g
orientation(Sim/Emu-only) start in a certain orientationLANDSCAPE or PORTRAIT
autoWebviewMove directly into Webview context. Default falsetruefalse
Go to https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md to see more Android and iOS specific Desired Capabilities!

How to Use The Inspector:


Start the Session. You need to install Android SDKs of emulators on your local machine. After seeing the simulator, you can see the inspector window. What is going on with different elements?

You can navigate the XML source, the response tree. This is how you can find the id or CSS Selector that you then can call.

... It is like the Firefox plugin, Firebug and Firepath used to determine strategies to find locators.

You can perform actions directly from Appium Desktop, such as sending keys to a textbox.

Note, if you input your Sauce Labs credentials you can use their virtual emulators of Android or IOS devices.

See any issues? Are the issues with:

  • Appium? https://github.com/appium/appium/issues
  • Appium Desktop? https://github.com/appium/appium-desktop/issues


Want to See More Webinars from Sauce L?




Happy Testing!

-T.J. Maher
Twitter | LinkedIn | GitHub

// Sr. QA Engineer, Software Engineer in Test, Software Tester since 1996.
// Contributing Writer for TechBeacon.
// "Looking to move away from manual QA? Follow Adventures in Automation on Facebook!"

No comments: