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

Last updated: Jul 16, 2019 23:32

Sharing an interactive device session with an IDE script 

Working with your IDE and the Perfecto Lab in parallel when developing Appium/selenium scripts is now much simpler. You no longer need additional add-ons or plugins. Session sharing allows you to work interactively on the device in the Perfecto Lab while executing an Appium/Selenium script simultaneously from your favorite IDE. 

Now, you can open a device in the Perfecto Lab and share that session with your IDE. This is intended for script development or debugging.

Step-by-step guide

  1. In the Perfecto Lab, open a device.
  2. Click the Copy Session ID button.

  3. Copy the session ID or capability code sample to the clipboard.

  4. Add the capability to your script in the IDE you are using.
    Now you can interact with the same device session via both the IDE script and the Perfecto Lab.
    When you use a new device or start a new Perfecto Lab session, you need a new session ID.


Session ID example
reporting_admin@perfectomobile.com_Interactivesession_19-05-06_08_54_58_1264
deviceSessionId Capability example
capabilities.setCapability("deviceSessionId", "reporting_admin@perfectomobile.com_Interactivesession_19-05-06_08_54_58_1264");

How To Video:

How To: Use Session ID in the New UI


Notes

  • Before committing, you must remove this capability from the script code. Otherwise, your script will fail.
  • This feature only works only if you have one device open in the Perfecto Oab. If you have 2 or more devices open, your test must 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).