我正在寻找使用最新(此时)Appium Java 客户端 6.1.0 创建 Tap/Swipe/Drag 等事件的“正确”或“最新”方式。我看到了不同的单证在Appium网站(点击使用TouchActions,触摸使用TouchAction),并没有引用作为我应该使用(和将要过时?)。
new TouchAction(driver)
.tap(tapOptions()
.withElement(element(myElement)))
.perform();
new TouchActions(driver)
.singleTap(myElement)
.perform();
Run Code Online (Sandbox Code Playgroud)
看起来TouchActions是Selenium项目的一部分,TouchAction是Appium的一部分,但这并不代表Appium就是正确的方式。
ps 我目前正在使用 Chrome/Safari 浏览器进行 Android/iOS 测试,但这并不意味着我不需要对代码的本机应用程序支持。
感谢您的时间