'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 (e.g. 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. 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? Is there a way I can interact with Apple Watch Home Screen?



Solution 1:[1]

Per the other question you have open regarding the iOS home screen, the watch can be interacted with the following bundle identifiers:

com.apple.BackBoard, com.apple.BaseBoardUI, com.apple.PreBoard, and com.apple.ReBoard.

The following debug command should show you what's available for interaction:

po XCUIApplication(bundleIdentifer: "oneOfThoseBundleIDs")

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mike Collins