Appium Inspector
Appium Desktop offers an Inspector that you can use to look up or locate elements of an application. It also lets you perform basic actions on these elements. Appium Inspector is an alternative to Perfecto Object Spy.
Requirements
This feature is available with Appium Desktop 1.12.0 and 1.17.0 only. Consider the use of Appium Desktop 1.17.0.
Limitations
Appium Inspector with Perfecto does not currently support:
- Hybrid apps
In particular, iOS 13 hybrid apps experience issues with pure Appium. - Automatic launch from Perfecto
- Smart Xpath
Prerequisites
The use of Appium Inspector with Perfecto requires Appium Desktop 1.12.0 or 1.17.0. Consider the use of Appium Desktop 1.17.0. To download, go to https://github.com/appium/appium-desktop/releases/tag/v1.12.0 or https://github.com/appium/appium-desktop/releases/tag/v1.17.0.
To get started with Appium Desktop, follow the usage instructions at https://github.com/appium/appium-desktop.
Step-by-step instructions
- In the Perfecto cloud, in the Manual Testing view, select the device you want to work with and click Open.
A new tab opens, showing the device screen with a device toolbar and a screenshot panel on the right. - On the device toolbar, click to install an application.
- In the Install application dialog box, click ADD FILE, browse to the relevant application file, and click Open.
- Click INSTALL APP.
- Open Appium Desktop and click File > New Session Window to start an Inspector session.
- In the Appium Inspector window, click Select Cloud Providers, select Perfecto, and click Done.
- In the Perfecto Host field, enter your cloud information, such as
mobilecloud.perfectomobile.com
. Make sure to remove the following from the URL:
- Protocol identifier (such ashttp://
orhttps://
)
-.app
(if part of the URL) -
In the Perfecto Port field, type
80
.This step is required even if
80
is already indicated as the default port. -
In the Perfecto Token field, enter the security token you generated for your user.
To generate a security token-
In the Perfecto UI at <YourCloud>.app.perfectomobile.com (where YourCloud is your actual cloud name, such as mobilecloud), click your user name and select My security token.
-
In the My security token form, click Generate Security Token.
-
Click Copy to clipboard. Then paste it into any scripts that you want to run with Perfecto.
- Click Close.
-
-
In the Perfecto cloud, copy the device ID as follows:
-
On the device toolbar, click to view device information.
- In the dialog box that opens, on the DEVICE tab, copy the device ID.
-
-
In the Appium Inspector window, on the Desired Capabilities tab, add the
deviceName
capability and paste the device ID into the Value field. -
In the Perfecto cloud, on the device toolbar, click to copy the session ID.
-
In the Appium Inspector window, on the Desired Capabilities tab, add the
deviceSessionId
capability and paste the session ID into the Value field.At this point, the JSON Representation should look similar to the following:
Copy{
"deviceName": "9E705A94B8920BB61AE6842FA00E20FC8C12C231",
"deviceSessionId": "johnd@perforce.com_Interactivesession_19-10-24_15_08_15_19205"} -
To connect Appium Inspector to the Perfecto device, click Start Session. The device screen appears in Appium Inspector.
Important: If the connection fails, check your firewall or antivirus setup. Alternatively, try connecting using the Custom Server tab instead, with the following details:- Remote Post:
<cloudname>.perfectomobile.com
- Remote Port:
443
- Remote Path:
nexperience/perfectomobile/wd/hub
If you connect this way, you also need to select the SSL checkbox and add your Perfecto
securityToken
as a capability. - Remote Post:
When Appium Inspector has successfully connected with your Perfecto device, you can inspect the elements of your application:
- In Perfecto, open the relevant app and navigate to the screen you want to inspect.
- In Appium Inspector, refresh to view the device screen that is now open in Perfecto.
- Inspect elements as needed.
For more information on using Appium Inspector, see https://github.com/appium/appium-desktop/blob/master/README.md.
Troubleshooting
If you attempt to start a session and it hangs for a long time or times out, enter 80
into the Perfecto Port field (even if 80
is already indicated as the default port) and try again (in the Step-by-step instructions, under 3 | Provide Perfecto credentials, see step 3).