Features

TvOS (Apple TV 4K)

During an Appium test you can use the buttons actions to simulate remote control navigation on the Apple TV.

Copy code
driver.execute_script('mobile: pressButton', { name: 'down' })
driver.execute_script('mobile: pressButton', { name: 'select' })
Copy code
await driver.execute('mobile: pressButton', { name: 'down' });
await driver.execute('mobile: pressButton', { name: 'select' });
Copy code
driver.execute_script('mobile: pressButton', {'name': 'down'})
driver.execute_script('mobile: pressButton', {'name': 'select'})
Copy code
driver.executeScript("mobile: pressButton", Map.of("name", "down"));
driver.executeScript("mobile: pressButton", Map.of("name", "select"));
Copy code
driver.ExecuteScript("mobile: pressButton", new Dictionary<string, string> { { "name", "down" } });
driver.ExecuteScript("mobile: pressButton", new Dictionary<string, string> { { "name", "select" } });

The following buttons are available:

Button Name Behaviour
Home Return to the home screen.
Menu Return to the previous operation or screen. In the context of tvOS, it works as a traditional back button.
Select Select the item with the current focus.
Up Move the focus upward in the UI.
Down Move the focus downward in the UI.
Left Move the focus left in the UI.
Right Move the focus right in the UI.
Play/Pause Control media playback. Play/Pause is a toggle.