xcodetvosapple-tvxcuitest

UI Automation for AppleTV system using XCode


Is UI automation available for the main menu of the Apple TV and not a specific application? I already setup the whole UI testing thing using XCode and tried using the remote control but it is only available for the application that was defined using XCUIApplication.

So is it possible to control the whole system rather than a specific application? I was thinking of something similar to pyatv but using XCode since I might be able to get more information concerning the current focused apps and so on.


Solution

  • There is an API XCUIApplication(bundleIdentifier: ) to interact with not-AUT apps. You need to substitute the right identifier for this Springboard-like interface. Maybe it is a Headboard, but I'm not sure.

    Bundle identifiers of tvOS apps https://github.com/rzakhar/XCTApps/blob/master/Sources/XCTApps/tvOS.swift