Get the Appium session ID

When you connect to your mobile device, a new Appium session starts. You can get the ID of your Appium session to use it later in your mobile test automation.

Use the Module Get Appium Session Id to save the Appium session ID to a buffer.

This Module is part of the Standard subset. You can find it under Standard modules->TBox XEngines->Mobile.

Get the Appium session ID

To save the Appium session ID to a buffer, follow the steps below:

  1. Specify the necessary test configuration parameters to establish a connection with the device.

  2. Add either the Open Mobile App TestStep or the OpenUrl TestStep as a first TestStep in the execution.

  3. Drag and drop the Get Appium Session Id Module onto your TestCase.

  4. For the ModuleAttribute Buffer Name, specify the name of the buffer to which you want to save the Appium session ID, for example SampleBuffer.

  5. Set the ActionMode to Input.

  6. To use the Appium session ID from the buffer, use the syntax {B[SampleBuffer]}.

    For detailed information on using buffers, see chapter "Using Buffers: a How-To Guide".

In this example, you save the Appium session ID to a buffer named SampleBuffer.

Get Appium Session Id Module in a TestCase