2

Testing Mobile native app with Appium using BroswerStack (Android device) and it throws an UnsupportedCommandException (please see below) when trying to execute the swipeGesture to perform a swipe up. Btw, it is working in a local execution using real devices or Emulators.

org.openqa.selenium.UnsupportedCommandException: Unknown mobile command "swipeGesture". 
Only shell,scrollBackTo,viewportScreenshot,deepLink,startLogsBroadcast,stopLogsBroadcast, 
acceptAlert,dismissAlert,batteryInfo,deviceInfo,changePermissions,getPermissions, 
performEditorAction,startScreenStreaming,stopScreenStreaming,getNotifications,listSms, 
type commands are supported.

My code is as follows

            ((JavascriptExecutor) driver).executeScript("mobile: swipeGesture", Map.of(
                    "left", location.x, "top", location.y - swipeBoxHigh,
                    "width", 100, "height", swipeBoxHigh,
                    "direction", "up",
                    "percent", 1,
                    "speed", 1500
            ));

Any idea why I am getting this Exception in browswerStack?

Any suggestion how to perform a swipe gesture in android using browserStack?

figuedmundo
  • 375
  • 1
  • 4
  • 15

1 Answers1

0

You can refer: https://www.browserstack.com/docs/app-automate/appium/advanced-features/appium-gestures for using swipe gestures on BrowserStack.

Also, try using different Appium versions including the one that you are using at your end to run your test locally. Take help from: https://www.browserstack.com/app-automate/capabilities

Sachin
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 03 '22 at 12:20