简体   繁体   English

BrowserStack 不支持 swipeGesture - 使用 Appium 进行自动化 - Android

[英]swipeGesture not supported by BrowserStack - Automation using Appium - Android

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.使用 BroswerStack(Android 设备)使用 Appium 测试移动原生应用程序,当尝试执行 swipeGesture 以执行向上滑动时,它会抛出 UnsupportedCommandException(请参见下文)。 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?知道为什么我在browswerStack中得到这个异常吗?

Any suggestion how to perform a swipe gesture in android using browserStack?任何建议如何使用 browserStack 在 android 中执行滑动手势?

You can refer: https://www.browserstack.com/docs/app-automate/appium/advanced-features/appium-gestures for using swipe gestures on BrowserStack.您可以参考: https://www.browserstack.com/docs/app-automate/appium/advanced-features/appium-gestures在 BrowserStack 上使用滑动手势。

Also, try using different Appium versions including the one that you are using at your end to run your test locally.此外,尝试使用不同的 Appium 版本,包括您在本地运行测试时使用的版本。 Take help from: https://www.browserstack.com/app-automate/capabilities寻求帮助: https://www.browserstack.com/app-automate/capabilities

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 关于Android上的Appium自动化的问题 - Questions on Appium Automation on Android 使用Java实现Appium自动化 - appium automation using java 在Appium Android自动化中找不到MobileElement - MobileElement was not found in appium android automation 使用appium自动化移动应用程序 - Automation mobile application using appium 元素显示android appium自动化java - is element displayed android appium automation java 使用Appium运行Web应用程序自动化的步骤 - Steps to run web application automation using Appium 在本机android应用的appium中使用findElementById(“ elementID”)。 错误:“不支持定位器策略'css选择器” - Using findElementById(“elementID”) with appium for native android app. Error: “Locator strategy 'css selector” is not supported" 无法使用 Appium、browserstack、代理和 okhttp、Java、Eclipse 创建新的远程会话 - Getting unable to create a new remote session, using Appium, browserstack, proxies and okhttp, Java, Eclipse Android应用程序自动化脚本:通过Appium,Selenium WebDriver,Java:NoSuchElementFoundException - Android application Automation Script: Through Appium, Selenium WebDriver, Java: NoSuchElementFoundException 在appium自动化期间无法在android app之间切换 - Failed to switch between android apps during appium automation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM