Understand the capabilities for Appium session
Before you create your first session, it’s important to understand the capabilities for each Appium session. The Appium session is the fundamental unit of interaction between your test code and the Appium Server. When you create a new session, you’re establishing a connection to the server and defining the target device, platform, and the app you want to automate.Required capabilities
The following table lists the specific device, platform, and app you want to automate to establish a successful connection.Optional capability
You can addappURL as optional capability to specify which app to launch during test run. Example values:
com.amazon.frenchpress.maincom.amazon.youtube.main
Create an Appium session
To create an Appium session for a Fire TV Stick, complete the following steps.-
Get your device serial number.
-
Set up capabilities.
-
Call the
driver.createSession()method and pass the desired capabilities. Example:
Example Appium session
Here’s how an Appium session looks:End your Appium session
To end an Appium session and release any associated resources, call thedriver.quit(). Failing to end your session properly can lead to resource leaks and issues with subsequent test runs.

