DEV Community

Bala Murugan for pCloudy

Posted on • Originally published at pcloudy.com

Appium desktop (Object Spy) integration with pCloudy

Appium Desktop for test automation
Appium desktop is a graphical interface for using Appium and inspecting your app structure. It helps to create easy test scripts and set up a quick Appium test server.

Appium Desktop has two components:
Appium Server: Server instance for enabling testing (and test automation) of apps.

Appium Inspector: For inspecting and getting all the details of UI elements of your apps.

What is Object spy?
Object spy is mechanism to add objects to the object repository and view object properties while running Appium Desktop. It displays the selected objects hierarchy tree and it’s properties and methods in the property tab in the object spy dialogue box.

How to integrate Appium Desktop with pCloudy
Steps to invoke Object Spy:

  1. We have three dedicated Android devices and we need to enter the particular device ID mentioned below:
    • ce011821e8f5671c01 -Galaxy S8
    • 213581e02d0b7ece -Galaxy S9
    • 803KPRW1598286 -Pixel 2 XL
      1. For iOS you need to enter UDID and for that you need to go to cloud then click on UDID

Then select the device and copy that UDID. If you are inspecting an element on iOS devices you should use resigned app to avoid exception.
Go to command prompt and execute Jar
e.g.: java -jar pCloudy-ObjectSpy.jar “https://[company].pcloudy.com” “Your_EmailID” “Your_ApiKey” “Application_Path” Booking_Duration(Integer type)

Select the device you will get the end point.

Now you need to copy the end point as you will use it in the coming step.

Open Appium Desktop
go to “Custom Server” tab
Then in the Remote Host section, enter “[company].pcloudy.com”
Then add Remote Port “443”
Click on “SSL” check box
Enter the Capabilities for Android

Sample:
“newCommandTimeout”: 600,
“launchTimeout”: 90000,
“pCloudy_ApplicationName”: “pCloudyAppiumDemo.apk”,
“appPackage”: “com.pcloudy.appiumdemo”,
“appActivity”: “com.ba.mobile.LaunchActivity”,
“platformName”: “Android”,
“deviceName”: “803KPRW1598286”

Capabilities for iOS
Sample:
“newCommandTimeout”: 600,
“launchTimeout”: 90000,
pCloudy_ApplicationName”: “TestmunkDemo.ipa”,
“platformName”: “iOS”,
“bundleId”: “com.pcloudy.TestmunkDemo”,
“usePrebuiltWDA”: false,
“acceptAlerts”: true,
“automationName”: “XCUITest”,
“udid”: “00008020-000A31960E3A002E”,
“deviceName”: “iPhone XR”

Paste the end point that you copied (refer step 5) in the “Remote Path” section in the Appium Desktop.

Then click on “Start Session”. It will book the device in pCloudy and you will get the element properties, once it is launched.

Top comments (0)