Add automationName and platformName desired cap constraints
MODIFY
lib/appium.js
lib/appium.js
@@ -111,6 +111,19 @@ const PLATFORMS_MAP = {
tizen: () => TizenDriver,
};
+const desiredCapabilityConstraints = {
+ automationName: {
+ presence: false,
+ isString: true,
+ inclusionCaseInsensitive: _.values(AUTOMATION_NAMES),
+ },
+ platformName: {
+ presence: true,
+ isString: true,
+ inclusionCaseInsensitive: _.keys(PLATFORMS_MAP),
+ },
+};
+
const sessionsListGuard = new AsyncLock();
const pendingDriversGuard = new AsyncLock();
@@ -118,6 +131,8 @@ class AppiumDriver extends BaseDriver {
constructor (args) {
super();
+ this.desiredCapConstraints = desiredCapabilityConstraints;
+
// the main Appium Driver has no new command timeout
this.newCommandTimeoutMs = 0;

Add automationName and platformName desired cap constraints (#11008)