Skip to content

Commit

Permalink
fix: do not add prefix to webSocketUrl capability (#1617)
Browse files Browse the repository at this point in the history
  • Loading branch information
eglitise authored Aug 20, 2024
1 parent 8f6ce6d commit e121b65
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
13 changes: 13 additions & 0 deletions app/common/renderer/constants/session-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,16 @@ export const PROVIDER_VALUES = {
};

export const ADD_CLOUD_PROVIDER_TAB_KEY = 'addCloudProvider';

export const STANDARD_W3C_CAPS = [
'platformName',
'browserName',
'browserVersion',
'acceptInsecureCerts',
'pageLoadStrategy',
'proxy',
'setWindowRect',
'timeouts',
'unhandledPromptBehavior',
'webSocketUrl', // WebDriver BiDi
];
14 changes: 2 additions & 12 deletions app/common/renderer/utils/other.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
import _ from 'lodash';
import {Promise} from 'bluebird';

const VALID_W3C_CAPS = [
'platformName',
'browserName',
'browserVersion',
'acceptInsecureCerts',
'pageLoadStrategy',
'proxy',
'setWindowRect',
'timeouts',
'unhandledPromptBehavior',
];
import {STANDARD_W3C_CAPS} from '../constants/session-builder';

export function addVendorPrefixes(caps) {
return caps.map((cap) => {
// if we don't have a valid unprefixed cap or a cap with an existing prefix, update it
if (
!_.isUndefined(cap.name) &&
!VALID_W3C_CAPS.includes(cap.name) &&
!STANDARD_W3C_CAPS.includes(cap.name) &&
!_.includes(cap.name, ':')
) {
cap.name = `appium:${cap.name}`;
Expand Down

0 comments on commit e121b65

Please sign in to comment.