You can use iOS Gateway to automate Apple TV (4th generation). Apple TV 4k (5th generation) is not supported, as the device lacks a USB port.
Note that when you connect to an Apple TV using iOS Gateway, images for installed apps don't display in the App List.
Get a tvOS Provisioning Profile
Controlling Apple TV
Normal operation of Apple TV involves the use of a remote control or a mobile app to interact with the UI and installed apps. When automating Apple TV in Eggplant Functional using iOS Gateway, you use the following keywords with the SenseTalk
TypeText command to replicate a quick push of the buttons on the remote:
|Remote Button||TypeText Keyword||Action|
|Left||Moves the on-screen selection one item to the left.|
|Right||Moves the on-screen selection one item to the right.|
|Up||Moves the on-screen selection one item up.|
|Down||Moves the on-screen selection one item down.|
|Menu||Presses the Menu button. This functions mainly as the Back button, but can have other app-specific uses.|
|Select||Presses the selected item.|
|Home||Presses the Home button. This is configurable in Apple TV preferences, home screen, or Watch TV app.|
|Play/Pause||Presses the Play/Pause button.|
You can also use the
SwipeDown commands to replicate pushing the directional arrows on the Apple TV remote control.
Apple TV does not support the use of coordinates in commands.
Swipe commands sent to Apple TV use the general
direction of the swipe to determine which way to swipe, rather than any specific coordinates you provide with those commands—those coordinates are ignored. We recommend using the
TypeText command with Apple TV for greater precision and control.
launchApp commands also work with tvOS.