From 13d8b03cc185c5f4e0631002614981ee6f86fab4 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Sun, 5 Jan 2025 15:04:26 +0100 Subject: [PATCH] fix(appium): Do not update BiDi commands for drivers which don't support it (#20879) --- packages/appium/lib/appium.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/appium/lib/appium.js b/packages/appium/lib/appium.js index 396f70144..f8a98583f 100644 --- a/packages/appium/lib/appium.js +++ b/packages/appium/lib/appium.js @@ -344,7 +344,9 @@ class AppiumDriver extends DriverCore { // We also want to assign any new Bidi Commands that the driver has specified, including all // the standard bidi commands - driverInstance.updateBidiCommands(InnerDriver.newBidiCommands ?? {}); + if (_.isFunction(driverInstance.updateBidiCommands)) { + driverInstance.updateBidiCommands(InnerDriver.newBidiCommands ?? {}); + } if (!_.isEmpty(this.args.denyInsecure)) { this.log.info('Explicitly preventing use of insecure features:');