Download test as Appium JavaScript

Downloads your Scriptless Mobile test as Appium JavaScript. Once downloaded, you can run your test locally.

URL

Copy
https://<cloud-name>.perfectomobile.com/scriptless-mobile-engine/script-generator/api/generator?testKey=<test-key>

Method

GET

Header parameters

Name

Description

Perfecto-Authorization

The Perfecto security token. For more information, see Generate a security token.

URL parameters

Name

Description

testKey

The repository key of the automation test file stored in the test repository area. For example, PUBLIC:deviceMonitoring.xml or PRIVATE:android/test.xml

Response

The response you receive after your call contains a link in signedURL. Click the URL to download your exported script as a .zip file.

Copy

JSON response

{
    "fileKey": "codeless/private/123456.zip",
    "signedUrl": "https://getcodeexample.com/js"
}

Run the script locally

To run the script locally:

  1. Open the .zip file in a code editor.

  2. Open the execute-test.js file.

  3. Follow the instructions in the execute-test.js file to run your script locally.