Last updated: Apr 01, 2020 14:40
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 Perfecto Lab, 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 2a).
In the Copy session ID form, below the session ID, click Copy to clipboard.
In the IDE you are using, add the
deviceSessionIDcapability to your script.
- Run your test. This performs all your test steps on the device in real-time.
deviceSessionIdcapability 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.executeScriptto 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: