Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Sep 08, 2020 11:44

Note: This feature is available with Appium Desktop 1.12.0 and 1.17.0 only. We recommend the use of Appium Desktop 1.17.0.

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. If you have worked with Perfecto before, it will help you to know that Appium Inspector replaces the functionality previously provided by Object Spy in the Legacy | Perfecto IDE.

The following video illustrates how you can use Perfecto with Appium Inspector.

On this page:

Prerequisites

The use of Appium Inspector with Perfecto requires Appium Desktop 1.12.0 or 1.17.0. We recommend 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


1 | Open a device for testing and install the app
  1. 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.
  2. On the device toolbar, click to install an application.
  3. In the Install application form, click ADD FILE, browse to the relevant application file, and click Open.
  4. Click INSTALL APP.
2 | Start an Appium Inspector session
  • Open Appium Desktop and click File > New Session Window to start an Inspector session.
3 | Provide Perfecto credentials
  1. In the Appium Inspector window, click Select Cloud Providers, select Perfecto, and click Done.
  2. 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 as http:// or https://)
    .app (if part of the URL)
  3. In the Perfecto Port field, type 80.

    Note: This step is required even if 80 is already indicated as the default port.
  4. In the Perfecto Token field, enter the security token you generated for your user. 

     If you have not generated a security token, click here for instructions
    To generate a security token:
    1. 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

    2. In the My security token form, click Generate Security Token.
    3. Click Copy to clipboard. Then paste it into any scripts that you want to run with Perfecto. 

    4. Click Close.

4 | Configure desired capabilities
  1. In the Perfecto cloud, copy the device ID as follows:

    1. On the device toolbar, click to view device information.

    2. In the form that opens, on the DEVICE tab, copy the device ID.
  2. In the Appium Inspector window, on the Desired Capabilities tab, add the deviceName capability and paste the device ID into the Value field.

  3. In the Perfecto cloud, on the device toolbar, click to copy the session ID.

  4. 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:

    {
      "deviceName": "9E705A94B8920BB61AE6842FA00E20FC8C12C231",
      "deviceSessionId": "johnd@perforce.com_Interactivesession_19-10-24_15_08_15_19205"
    }
  5. To connect Appium Inspector to the Perfecto device, click Start Session. The device screen appears in Appium Inspector.

Note: 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.

5 | Inspect elements

When Appium Inspector has successfully connected with your Perfecto device, you can inspect the elements of your application:

  1. In Perfecto, open the relevant app and navigate to the screen you want to inspect.
  2. In Appium Inspector, refresh to view the device screen that is now open in Perfecto.
  3. Inspect elements as needed.

For more information on using Appium Inspector, see https://github.com/appium/appium-desktop/blob/master/README.md.

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

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).