From 45dd3b9e9ea87cd101955bc836bce35206ab7b72 Mon Sep 17 00:00:00 2001 From: mojtabaalavi Date: Tue, 5 Dec 2023 09:45:51 +1300 Subject: [PATCH] Update Appium.js - Issue codeceptjs#4047 - bstack:options'Prefix The 'bstack:options' key should not be prefixed with 'appium' as it may lead to improper execution of BrowserStack commands. The rationale behind this change is to ensure that the code block executes when the value of the variable key is neither 'platformName' nor 'bstack:options.' It's crucial to avoid prefixing 'appium' to 'bstack:options' as doing so might hinder the correct execution of BrowserStack commands. Resolves #4047 Applicable helpers: Appium Type of change: Bug fix --- lib/helper/Appium.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helper/Appium.js b/lib/helper/Appium.js index c0714ca0a..2eae24a3d 100644 --- a/lib/helper/Appium.js +++ b/lib/helper/Appium.js @@ -276,7 +276,7 @@ class Appium extends Webdriver { const _convertedCaps = {}; for (const [key, value] of Object.entries(capabilities)) { if (!key.startsWith(vendorPrefix.appium)) { - if (key !== 'platformName') { + if (key !== 'platformName' && key !== 'bstack:options') { _convertedCaps[`${vendorPrefix.appium}:${key}`] = value; } else { _convertedCaps[`${key}`] = value;