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

Last updated: May 22, 2019 09:24

Sharing interactive device session with an IDE script. 

We have simplified the work process with your IDE and the Perfecto Lab in parallel, when developing Appium/Selenium scripts. No additional add-ons/plugins are required anymore. 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 then share that session with your IDE . This is intended for script development or debugging.

Step-by-step guide

  1. Open a Perfecto lab and open a device
  2. Click the "More" link and select "Session ID"

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

  4. Add the capability to your script in the IDE you are using

  5. Now you can interact with the same device session with both the IDE script and the Perfecto lab

  6. A New session ID is needed when a new Perfecto Lab session is started or when using a new device

  7. Notes: 

    1. Remove the capability line from your script when the debug session is over. (The test will fail if the session does not exist)

    2. This feature will work only if you have one device opened in the Perfecto lab. If you have 2 or more devices you must specify in your test the device id you want (same as you would do if running a test on a device, without it being open in the Perfecto Lab).

Session ID example
B8DA4E1494C08BA5A4AFB8B5E7D8729A
deviceSessionId Capability example
capabilities.setCapability("deviceSessionId", "B8DA4E1494C08BA5A4AFB8B5E7D8729A");



Notes:

  1. Do not forget to remove this capability from the script code before committing. Otherwise your script will fail
  2. This feature will work only if you have one device opened in the Perfecto lab. If you have 2 or more devices you must specify in your test the device id you want (same as you would do if running a test on a device, without it being open in the Perfecto Lab).