Jul 14, 2025
Comprehensive Guide: Automating Android and Apple TV Apps with Appium
Master TV app automation using Appium. Explore setup, remote navigation, full test code, and expert QA tips from GeekyAnts for Android TV and Apple TV apps.
Author


Book a call
Table of Contents
At GeekyAnts, we’ve been at the forefront of this revolution, specializing in TV app automation since the early days of smart TV platforms. Our team of experts in Bangalore, India, has successfully automated testing for numerous high-profile TV apps, ensuring they perform flawlessly across different platforms.
How TV App Testing Differs from Mobile App Testing
- Key difference: Remote control navigation vs touchscreen
- Similar core testing process, but with platform-specific nuances
- Design considerations: Landscape mode, video content focus
1. Setting up the Environment
- Java Development Kit (JDK)
- Android Studio (for Android TV)
- Xcode (for Apple TV)
- Node.js and npm
- Appium Server
- Appium Client (Java)
- Maven (for dependency management)
To install Appium, run:
Add the following dependencies to your pom.xml:
2. Initializing Appium Driver
Here's how to initialize the Appium driver for Android TV and Apple TV:
3. Launching the App
The app will be launched automatically when initializing the driver. To relaunch:
4. Navigating Using Remote
Controlling Android TV Devices (Fire TV/Nvidia Shield) with Keycodes
For Android TV:
For Apple TV:
Performing Remote Actions
For Android TV:
For Apple TV:
Complete Android TV Keycode mapping
KeyCode | Button | KeyEvent | Behavior |
4 | Back | BACK | Returns the user to the previous operation or screen (Activity). |
82 | Menu | MENU |
Opens the Android context menu (Options Menu).
23
Select (D-Pad Center)
DPAD_CENTER
Selects the UI item currently in focus.
19
Up (D-Pad)
DPAD_UP
Moves the focus upward in the UI.
20
Down (D-Pad)
DPAD_DOWN
Moves the focus downward in the UI.
21
Left (D-Pad)
DPAD_LEFT
Moves the focus to the left in the UI.
22
Right (D-Pad)
DPAD_RIGHT
Moves the focus to the right in the UI.
85
Play/Pause
MEDIA_PLAY_PAUSE
Toggles media playback between Play and Pause.
89
Rewind
MEDIA_REWIND
Rewinds or skips backwards in media playback contexts.
90
Fast Forward
MEDIA_FAST_FORWARD
Fast forwards or skips ahead in media playback contexts.
Understanding these key mappings is crucial for developers creating applications or automation for Android TV platforms. These keycodes provide a standardized way to interpret user input from various remote controls and input devices, ensuring consistent navigation and interaction across different Android TV apps and devices.
By leveraging this keycode system, developers can create intuitive and responsive user interfaces that align with Android TV's design principles and user expectations.
Complete Apple TV Keycode Mapping
Button Name | Behavior |
Home | Returns the user to the home screen (Activity). |
Menu | Returns the user to the previous operation or screen (Activity). |
Select | Selects the UI item currently in focus. |
Up | Moves the focus upward in the UI. |
Down | Moves the focus downward in the UI. |
Left | Moves the focus to the left in the UI. |
Right | Moves the focus to the right in the UI. |
Play/Pause | Toggles media playback between Play and Pause. |
Mastering these key mappings is essential for developers building applications or automations for Apple TV platforms. This standardized set of buttons and behaviors ensures a consistent user experience across various tvOS apps and devices.
By adhering to these established input conventions, developers can create intuitive and responsive interfaces that align with Apple TV's design philosophy and user expectations, resulting in seamless navigation and interaction for viewers.
5. Element Interactions
Locating Elements
Checking Element Focus
Handling Non-Focusable Elements
Navigating Grid Layouts
Performing Search
Playing Video
6. Complete Working Code Base
Here's a complete working code base that incorporates all the concepts we've discussed:
GeekyAnts Expertise: This code base represents just a fraction of our comprehensive TV app testing framework. Our full suite includes advanced features like parallel test execution, detailed logging, and integration with CI/CD pipelines.
- This guide provides a comprehensive overview of automating Android and Apple TV apps using Appium with Java
- Covers environment setup, driver initialization, basic and advanced operations, and element interactions
- Demonstrates how to create a complete working test scenario for both platforms
At GeekyAnts, we do not just automate tests – we enhance the entire TV app development lifecycle. Let us bring our expertise to your project and ensure your TV app stands out in the competitive smart TV market.
Subscribe to Our Newsletter
Subscribe to RSS
Press & Media Hub RSS FeedRelated Articles.
More from the engineering frontline.
Dive deep into our research and insights on design, development, and the impact of various trends to businesses.

Jun 27, 2026
Building a Resilient Hybrid-Cloud Network with WireGuard HA, Route-Based Failover, and Deep Observability

Jun 19, 2026
We Built a 114-Second AWS-to-Azure Failover. Here’s What We Learned

Jun 12, 2026
Cloud-Native and Cloud-Agnostic Are Not Ideologies; They Are Business-Stage Decisions

Jun 8, 2026
Geeklego: The Open-Source Design System Built to Work With AI

May 18, 2026
Your Vibe Code Has No Memory. DESIGN.md Fixes That.

May 14, 2026