简体   繁体   English

Apple Watch 与主屏幕的交互

[英]Apple Watch interaction with Home Screen

I am automating Apple Watch ui testing and currently I stuck with the problem interacting with Apple Watch Home Screen (eg tap, press, scroll, etc.) I know that testing is happening in the sandbox of the app under test, but I need to interact with the elements on Home Screen when the app under test is running on the background.我正在自动化 Apple Watch ui 测试,目前我遇到了与 Apple Watch 主屏幕交互的问题(例如点击、按下、滚动等)我知道测试是在被测应用程序的沙箱中进行的,但我需要当被测应用程序在后台运行时,与主屏幕上的元素进行交互。 I know that Appium does similar thing to iPhone's Home Screen via "com.apple.springboard" which is the app, that manages iPhone's Home Screen, but what about Apple Watch?我知道 Appium 通过管理 iPhone 主屏幕的应用程序“com.apple.springboard”做与 iPhone 主屏幕类似的事情,但是 Apple Watch 呢? Is there a way I can interact with Apple Watch Home Screen?有什么方法可以与 Apple Watch 主屏幕互动吗?

Per the other question you have open regarding the iOS home screen, the watch can be interacted with the following bundle identifiers:根据您就 iOS 主屏幕打开的另一个问题,手表可以与以下捆绑包标识符进行交互:

com.apple.BackBoard , com.apple.BaseBoardUI , com.apple.PreBoard , and com.apple.ReBoard . com.apple.BackBoardcom.apple.BaseBoardUIcom.apple.PreBoardcom.apple.ReBoard

The following debug command should show you what's available for interaction:以下调试命令应向您显示可用于交互的内容:

po XCUIApplication(bundleIdentifer: "oneOfThoseBundleIDs")

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM