For the purpose of script development and debugging, you can open a device in the Perfecto Lab and share that session with your favorite IDE. Session sharing allows you to work interactively on the device in the Perfecto Lab while simultaneously executing an Appium or Selenium script from your IDE. 

Step-by-step instructions

Watch the following video to see how to copy a session ID and include it in a script.

On this page:

To share the session ID:

  1. In the Perfecto Lab, open a mobile device.

  2. On the device tab, in the device toolbar, click the Copy Session ID button .

  3. In the Copy session ID form, copy the session ID or capability code sample to the clipboard.

  4. In the IDE you are using, add the deviceSessionID capability to your script.

    capabilities.setCapability("deviceSessionId", "3d3718b8-0700-4ecb-99dd-71c1def7138b");
  5. If you have 2 or more devices open, also specify the device ID to use (same as you would do if running a test on a device without the device being open in the Perfecto Lab), as follows:

    1. On the device toolbar, click the information icon .

    2. In the device info form, on the Device tab, copy the Device ID.
    3. In the IDE you are using, add the deviceName capability to your script.

      capabilities.setCapability("deviceName", "00008030-001D29661488802E");
  6. Run your test. This performs all your test step on the device in real-time.
  • When you use a new device or start a new Perfecto Lab session, you need a new session ID.
  • If you intend to run your script outside of session sharing, before committing, remove these capabilities from the script code. Otherwise, your script will fail.