Running Selenium Scripts
SELENIUM is an open source test automation framework used to perform tests on web applications for cross-browser testing. You can integrate it with pCloudy to automate tests for web apps and mobile Apps. If you have your Selenium Scripts (or you plan to build them) in Java then you can use the pCloudy-java-connector.jar to integrate with the pCloudy platform. In case, you don’t have your selenium script then, you will need to use the rest APIs from
Objective of this document
This document guide will help you to understand the APIs that pCloudy platform provides to integrate your existing Selenium Scripts with pCloudy. After the integration, you will be able to execute your Selenium scripts from your PC directly to the pCloudy browser cloud.
- Selenium Script
- pCloudy Account
Note - Steps to get the API Key on the platform have been given below for both the Old and New Interface, please scroll down to access the instructions for the same in the old UI.
Steps to get the API key in the New User Interface (New UI)
Step 2 - Click on your initals given at the top right corner of the screen and click on Profile
Step 3 - You can find your API access key here. You can copy the same or click on Regenerate to get a new one.
Steps to get the API key in the Old User Interface (Old UI)
Step 2: Click on your name given at the top right corner of the screen and click on Settings
Step 3: You can find your API access key here. You can copy the same or click on Regenerate to get a new one.
Using pCloudy Selenium Capabilities
The basic steps to replace your local Appium driver to pCloudy Appium Driver using pCloudy Appium capabilities are given below:
Set pCloudy capabilities
- pCloudy_Username: Enter the email ID with which you have registered on pCloudy. For reference, check this link
Example: capabilities.setCapability("pCloudy_Username", '< e-mail-id >');
- pCloudy_ApiKey: API key is important for user's verification. You can generate the API key from Settings page on device.pcloudy.com. Check this link to get your API key.
Example: caps.setCapability("apiKey", < API Key >);
- clientName: Enter the email ID with which you have registered on pCloudy.
Example: capabilities.setCapability("clientName", < e-mail-id >);
- os: Mention what platform user wants to run the tests on. e.g. Windows, Linux etc.
Example: capabilities.setCapability("os, < platform name >);
- osVersion: Mention the os version of the platform to be used for testing. e.g. 8.1, 10 for Windows etc.
Example: capabilities.setCapability("osVersion", < Platform os version >);
- browserName: Mention the name of the browser to be used for testing. e.g. Chrome, firefox etc.
Example: capabilities.setCapability("browserName", < Browser name >);
- browserVersions: Mention the version of the browser to be used for testing. e.g. 77, 78, 79 etc.
Example: capabilities.setCapability("browserVersions", < version of browser >);
- Create the Selenium driver object and perform the execution
Below is the code snippet for the pCloudy integration. Users can use this code in their initialization method.
Users can set the values of platform OS version, browsers, browser versions and parallel tests. Below is the sample of testng.xml file.
Here is a link to a
Selenium Sample Project