Skip to content

Commit

Permalink
fix: add pcloudy:options for setting the 'source', username and apike…
Browse files Browse the repository at this point in the history
…y capability for pCloudy to comply with W3C (appium#1388)

* fix: add pcloudy:options for setting the 'source', username and apikey capability for pCloudy to comply with W3C

**Issue:**
appium#391

**Fixes:**
add pcloudy:options for setting the 'source', username and apikey capability for pCloudy to comply with W3C

* fix: formatting error
  • Loading branch information
shibupanda authored Mar 14, 2024
1 parent 42c98b9 commit 9604b7f
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 142 deletions.
18 changes: 9 additions & 9 deletions app/renderer/actions/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,17 +402,17 @@ export function newSession(caps, attachSessId = null) {
host = session.server.pcloudy.hostname;
port = session.server.pcloudy.port = 443;
path = session.server.pcloudy.path = '/objectspy/wd/hub';
desiredCapabilities.pCloudy_Username =
session.server.pcloudy.username || process.env.PCLOUDY_USERNAME;
desiredCapabilities.pCloudy_ApiKey =
session.server.pcloudy.accessKey || process.env.PCLOUDY_ACCESS_KEY;
if (
!(session.server.pcloudy.username || process.env.PCLOUDY_USERNAME) ||
!(session.server.pcloudy.accessKey || process.env.PCLOUDY_ACCESS_KEY)
) {
showError(new Error('PCLOUDY username and api key are required!'));
username = session.server.pcloudy.username || process.env.PCLOUDY_USERNAME;
accessKey = session.server.pcloudy.accessKey || process.env.PCLOUDY_ACCESS_KEY;
if (!username || !accessKey) {
showError(new Error(i18n.t('pcloudyCredentialsRequired')));
return false;
}
desiredCapabilities['pcloudy:options'] = {
source: 'appiumdesktop',
pCloudy_Username: username,
pCloudy_ApiKey: accessKey,
};
https = session.server.pcloudy.ssl = true;
break;
case ServerTypes.testingbot:
Expand Down
Loading

0 comments on commit 9604b7f

Please sign in to comment.