@@ -117,6 +117,43 @@ const vendorPrefix = {
117117 * }
118118 * ```
119119 *
120+ * Example Android App using Appiumv2 on BrowserStack:
121+ *
122+ * ```js
123+ * {
124+ * helpers: {
125+ * Appium: {
126+ * appiumV2: true,
127+ * host: "hub-cloud.browserstack.com",
128+ * port: 4444,
129+ * user: process.env.BROWSERSTACK_USER,
130+ * key: process.env.BROWSERSTACK_KEY,
131+ * app: `bs://c700ce60cf1gjhgjh3ae8ed9770ghjg5a55b8e022f13c5827cg`,
132+ * browser: '',
133+ * desiredCapabilities: {
134+ * 'appPackage': data.packageName,
135+ * 'deviceName': process.env.DEVICE || 'Google Pixel 3',
136+ * 'platformName': process.env.PLATFORM || 'android',
137+ * 'platformVersion': process.env.OS_VERSION || '10.0',
138+ * 'automationName': process.env.ENGINE || 'UIAutomator2',
139+ * 'newCommandTimeout': 300000,
140+ * 'androidDeviceReadyTimeout': 300000,
141+ * 'androidInstallTimeout': 90000,
142+ * 'appWaitDuration': 300000,
143+ * 'autoGrantPermissions': true,
144+ * 'gpsEnabled': true,
145+ * 'isHeadless': false,
146+ * 'noReset': false,
147+ * 'noSign': true,
148+ * 'bstack:options' : {
149+ * "appiumVersion" : "2.0.1",
150+ * },
151+ * }
152+ * }
153+ * }
154+ * }
155+ * ```
156+ *
120157 * Additional configuration params can be used from <https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md>
121158 *
122159 * ## Access From Helpers
@@ -234,7 +271,9 @@ class Appium extends Webdriver {
234271 const _convertedCaps = { } ;
235272 for ( const [ key , value ] of Object . entries ( capabilities ) ) {
236273 if ( ! key . startsWith ( vendorPrefix . appium ) ) {
237- _convertedCaps [ `${ vendorPrefix . appium } :${ key } ` ] = value ;
274+ if ( key !== 'platformName' ) {
275+ _convertedCaps [ `${ vendorPrefix . appium } :${ key } ` ] = value ;
276+ }
238277 } else {
239278 _convertedCaps [ `${ key } ` ] = value ;
240279 }
0 commit comments