Appium Inspector Documentation

repository·main·Indexed 23 days ago

https://github.com/appium/appium-inspector

A GUI-based tool for visually inspecting mobile and web applications powered by Appium. It allows developers and testers to view screenshots, inspect page sources, interact with elements, and execute driver commands. Available as a standalone desktop application for macOS, Windows, and Linux, or as an Appium server plugin.

Tokens
13.8K
Snippets
17
Records
86
Agent score
80%

What's inside Appium Inspector

  1. What is Appium Inspector

    main

    Appium Inspector is a GUI assistant tool for the Appium ecosystem. It provides visual inspection of applications under test by providing screenshots and page sources. Key features include:

    • Interacting with the application via screenshots.
    • Searching for and interacting with UI elements.
    • Executing driver actions.
    • Recording user actions.
  2. Overview of Appium Inspector features

    main

    Appium Inspector is a GUI assistant tool that provides visual inspection of applications under test. Key capabilities include:

    • Visual Inspection: View application page screenshots alongside the page source.
    • Server Configuration: Specify Appium server connection details.
    • Interaction: Interact directly with the application screenshot.
    • Element Discovery: Search for specific elements and interact with them.
    • Command Execution: Run Appium driver commands directly from the GUI.
  3. Overview of the Session Builder

    main

    The Session Builder is the primary interface presented when you first open the Appium Inspector. It serves as the central hub for configuring and starting new automation sessions. The interface is organized into several functional areas:

    • Application Settings: Global configuration for the Inspector application.
    • Configuration of Server Details: Settings for connecting to the Appium server (e.g., remote host, port).
    • Capability Builder tab: The interface used to construct new session capabilities.
    • Saved Capability Sets tab: Access to previously stored capability configurations.
    • Attaching to Existing Session tab: Tools for connecting the Inspector to a session that is already running.
  4. Overview of the Session Inspector

    main

    The Session Inspector is the primary interface displayed when you are actively connected to an Appium session. It serves as the central hub for most Inspector functionalities, allowing you to interact with the application under test.

    The interface is organized into several functional areas:

    • Header: Contains action buttons and session controls.
    • Screenshot panel: Displays the current visual state of the application.
    • Source tab: Provides access to the application's element hierarchy (DOM/XML).
    • Commands tab: Used for executing specific commands against the session.
    • Gestures tab: Allows for the creation and execution of touch/pointer gestures.
    • Recorder tab: Enables recording of user interactions to generate scripts.
    • Session Information tab: Displays metadata and details about the active session.
  5. Use the Screenshot Panel in Session Inspector

    main

    The Screenshot panel is located on the left side of the Session Inspector. It displays the current device screen and provides tools for interacting with the UI via element selection or raw coordinates.

    Key behaviors:

    • Dimensions: Supports all dimensions and orientations. The Inspector automatically scales the screenshot to fit either the full window height or 40% of the window width.
    • Multi-display devices: By default, only the primary display is shown. On supported devices, you can switch displays using the Display Switcher button in the header.
    • Refreshing: By default, screenshots are static and only update when a manual refresh is requested. To enable automatic, real-time mirroring of the device screen (even when interacting outside the Inspector), you must use MJPEG session capabilities like appium:mjpegServerPort.
  6. Features of Appium Inspector

    main

    Appium Inspector provides a comprehensive suite of tools for test automation development and app inspection, including:

    • Session Management: Define server connection details, save capability sets, and attach to existing Appium sessions.
    • Element Inspection & Interaction: Select elements via screenshots, search using various locator strategies, and interact with elements (click, tap, send keys, clear).
    • Gesture & System Simulation: Create custom gestures, interact via screenshot (swipe, tap), and simulate system actions (e.g., iOS Home/Siri, Android Back/Home/App Switch).
    • Automation Support: Record actions directly into Appium client code for over 5 programming languages and view suggested selectors for your scripts.
    • Advanced Debugging: Compare element finding strategy speeds, switch application contexts, and access a library of Appium driver commands.
    • Cloud Integration: Connect to 10+ different cloud platforms.
  7. Use the Appium Inspector Plugin web interface

    main

    Once the plugin is installed and the Appium server is running, you can access the web-based Appium Inspector interface directly through your server. The interface is available at the /inspector endpoint of your Appium server URL.

    This plugin provides full feature parity with the standalone Appium Inspector, allowing you to inspect and interact with your application under test via a browser.

  8. Understand command properties and parameters

    main

    Commands and execute methods in the list may display additional metadata provided by the driver or plugin:

    • Deprecated Commands: Marked with a yellow-tinted background. Refer to your driver/plugin documentation for details on why they are deprecated.
    • Additional Information: Hovering your mouse over a command may reveal extra descriptive information.
    • Parameters: Clicking on a command opens a parameters popup. These parameters are categorized as either required or optional.
  9. Understand the Appium Inspector UI structure

    main

    The Appium Inspector interface is divided into two primary functional areas:

    • Session Builder: The initial screen used to define Appium server connection details, capabilities, and session configurations.
    • Session Inspector: The interface displayed during an active session. It provides access to the application screenshot, page source, element inspection, and interaction tools.
  10. Use the Gesture Builder to create or edit gestures

    main

    The Gesture Builder is the interface for defining the sequence and parameters of a gesture. It is divided into four main sections:

    1. Header: Contains the gesture title, description, and coordinate unit settings.
      • Coordinate Units: You can toggle between relative (percentage) and absolute (pixels) for X/Y coordinates.
      • Play: Executes the gesture immediately.
      • Save As: Saves a new gesture with the current title.
      • Save: Overwrites an existing gesture (only enabled during editing).
    2. Gesture Timeline: A visual representation of the sequence of actions. Icons indicate the types of actions present (e.g., Move, Pointer Down, Pointer Up).
    3. Pointer Tabs: Shows the active pointers used in the gesture. You can use up to 5 simultaneous pointers. Each pointer has a unique color and can be renamed.
    4. Pointer Actions: A collection of cards defining the behavior of each pointer. You can add or remove these cards to build the gesture sequence.
  11. Understand the Source Tab layout

    main

    The Source tab is the default view when starting an Inspector session. It consists of two main connected panels:

    1. Application Source panel: Displays the application's XML structure in a tree format.
    2. Selected Element panel: Appears only when an element is selected, providing detailed information about that specific element.

    You can use the divider line between these two panels to adjust their widths or to collapse/expand them.