Skip to content

Source Tab

The Source tab is the default tab opened after starting an Inspector session. It can be divided into two connected parts: the Application Source panel, and the Selected Element panel.

Source Tab

The divider line in the middle of the tab can be used to adjust the widths of both halves of this tab, as well as collapse/expand them.

Application Source

The Application Source is the central panel of the Source Tab, and shows the application source XML in a tree-like structure.

Application Source

The panel can be divided into 3 parts: header buttons, source actions, and the source tree.

Source Header Buttons

Icon Description
Copy XML Button Copy the application XML to the clipboard
Download XML Button Download the source as an .xml file

Source Action Buttons

Icon Description
Collapse All Button Collapse all nodes in the source tree
Toggle Attributes Button Toggle all non-'important' element attributes
Search Source Field Perform a plaintext search in the source XML

Source Tree

The application source tree is generated from the XML data returned by the Appium driver. By default, the tree only shows the class name for each element entry, along with several 'important' attributes such as value and content-desc. All non-'important' attributes are hidden by default for ease of navigation, but can be revealed with the Toggle Attributes button.

All elements in the XML tree are interactable, and clicking on one causes 3 actions:

Elements that have one or more child elements have an arrow on their left side, which can be clicked to toggle visibility of such child elements.

For supported Appium drivers, the maximum depth of the returned XML tree can be adjusted with the snapshotMaxDepth setting.

Refreshing the Source

By default, the source XML is only updated when a refresh is requested. This can happen when:

Note that interacting with the application outside of the Inspector will not cause the source XML to refresh.

The use of MJPEG session capabilities (such as appium:mjpegServerPort) allows to modify this behavior. While the default source refresh behavior in MJPEG mode stays the same, the mode adds the automatic source refresh button in the application header, which allows to disable automatic refreshing.

Selected Element

The Selected Element panel is shown on the right side of the Source tab. It is empty by default, but becomes populated once an element is selected.

Selected Element

In order to populate the panel, an element can be selected in one of the following ways:

The panel can be divided into 4 parts: header buttons, element action buttons, suggested locators, and element attributes.

Element Header Buttons

Icon Description
Copy Attributes Button Copy the element attributes to the clipboard as an array of JSON objects
Download Element Screenshot Download a screenshot of the element as a .PNG file

Element Action Buttons

Icon Description
Tap Element Tap the element
Send or Clear Element Text Enter text to send to the element, or clear its text
Get Element Timings Run a timing comparison for the suggested element locators

Suggested Locators

This table lists one or more locator strategies + selectors that can be used to find the element. Clicking on a selector copies it to the clipboard.

Pressing the timing comparison button executes a search for each of the listed strategies + locators, and adds a new table column with the elapsed time until the element was returned.

Locators Table With Timings

Element Attributes

This table lists all attributes retrieved from the element, along with their values. Clicking on a value copies it to the clipboard.

Refer to your Appium driver documentation for ways to customize the attributes shown in this table.