Skip to content

Pcloudy-Sample/PC-appium-nodejs

Repository files navigation

Run Appium Tests with Node.js on pCloudy

pCloudy Node.js WebdriverIO

Overview

pCloudy provides access to real Android and iOS devices from the cloud. This project contains Node.js Appium samples that run against pCloudy with minimal changes from standard Appium workflows.

Prerequisites

  • Node.js 20 or higher
  • npm
  • A pCloudy account with your registered email ID and API key
  • Your app package or IPA uploaded to your pCloudy Cloud Drive when needed

Setup

Clone the project and install dependencies:

git clone https://github.com/Pcloudy-Sample/PC-appium-nodejs.git
cd PC-appium-nodejs
npm install

Create a local environment file:

cp .env.example .env

Update the values in .env with your pCloudy credentials:

PCLOUDY_USERNAME=your_email_id
PCLOUDY_APIKEY=your_api_key

Run the samples

Use the following npm scripts:

npm run android-app
npm run android-web
npm run ios-app
npm run ios-web

You can also run the scripts directly with Node:

node android-app.js
node android-web.js
node ios-app.js
node ios-web.js

The appium:pCloudy_ApplicationName capability must match the app already uploaded to your pCloudy Cloud Drive. For iOS, make sure the app name and bundle ID in the script match your uploaded app.

Capabilities used in this sample

Capability Description
pCloudy_Username Your pCloudy account email ID
pCloudy_ApiKey Your pCloudy API key
pCloudy_DeviceFullName Device name to book from pCloudy
pCloudy_ApplicationName App uploaded to pCloudy Cloud Drive
automationName Appium automation engine (UiAutomator2 for Android or XCUITest for iOS)
appium:appPackage / appium:appActivity Android package and launch activity
bundleId iOS bundle identifier

The driver connects to the pCloudy Appium hub at:

https://device.pcloudy.com/appiumcloud/wd/hub

Project structure

PC-appium-nodejs/
├── package.json           # npm scripts and dependencies
├── utils.js               # Shared helpers for screenshots and driver setup
├── android-app.js         # Android native app sample
├── android-web.js         # Android web sample
├── ios-app.js             # iOS native app sample
├── ios-web.js             # iOS web sample
├── .env.example           # Example environment variables
├── screenshots/           # Captured screenshots
└── README.md              # Project documentation

Notes

  • Screenshots are saved to the screenshots folder while each script runs.
  • Update the device names and app identifiers in the scripts if your pCloudy account uses different resources.

Learn more

About

Run Appium Tests with nodejs on Pcloudy

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages