Last updated: Jan 12, 2021 11:41
Mobile device
To share the session ID:
In the Manual Testing view, open a mobile device.
On the device tab, in the device toolbar, click the Copy Session ID icon
.
In the Copy session ID form, copy the session ID or capability code sample to the clipboard.

In your IDE, add the deviceSessionID
capability to your script and paste the session ID as the value.
3d3718b8-0700-4ecb-99dd-71c1def7138b
capabilities.setCapability("deviceSessionId", "3d3718b8-0700-4ecb-99dd-71c1def7138b");
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 Perfecto), as follows:
On the device toolbar, click the information icon
.
- In the device info form, on the Device tab, copy the Device ID.
In your IDE, add the deviceName
capability to your script.
capabilities.setCapability("deviceName", "00008030-001D29661488802E");
- Run your test. This performs all your test steps on the device in real-time.
- Access your test report. The report becomes available when you release the device.
Desktop web
Watch the following video to see how to copy a session ID and include it in a script.
To share the session ID:
In the Manual Testing view, in the left pane, select the Web folder.
Click OPEN NEW WEB SESSION.
In the Open new web session form, do the following:
Select the I will use this session to debug my automation script checkbox.
- Select your session parameters, including platform, browser, version, resolution, and location.
- Click OPEN.
On the session tab, on the session toolbar, click the Copy session ID button
(this button is only available if you selected the checkbox in step 3a).
In the Copy session ID form, below the session ID, click Copy to clipboard.

In your IDE, add the deviceSessionID
capability to your script and paste the session ID as the value.
capabilities.setCapability("deviceSessionId", "48402b47-2281-4bc6-9877-f446f81a5dfc");
- Run your test. This performs all your test steps on the device in real-time.
- Access your test report. The report becomes available when you release the device.
Limitations
- At this point, session sharing for desktop web is only available for Windows machines.
When the
deviceSessionId
capability is used along with other capabilities, the only capability that takes effect is
deviceSessionId
. Other capabilities (such as install app or open app) are ignored. You can use the Perfecto
driver.executeScript
to code these and other actions (for more information, see
Execute proprietary functions). For example, if you want to install an application as part of the shared session, you can use the following code:
//declare the Map for script parameters
Map<String, Object> params = new HashMap<>();
params.put("file", "PRIVATE:applications/Errands.ipa");
params.put("instrument", "noinstrument");
driver.executeScript("mobile:application:install", params);