### Launch Appium Server with Inspector Plugin Source: https://appium.github.io/appium-inspector/latest/quickstart/installation Starts the Appium server with the Inspector plugin enabled and allows Cross-Origin Resource Sharing (CORS). ```bash appium --use-plugins=inspector --allow-cors ``` -------------------------------- ### Install Appium Inspector via WinGet (Windows) Source: https://appium.github.io/appium-inspector/latest/quickstart/installation Installs the Appium Inspector desktop application on Windows using the WinGet package manager. This method is community-supported. ```bash winget install AppiumDevelopers.AppiumInspector ``` -------------------------------- ### Install Appium Inspector Plugin (Appium 3) Source: https://appium.github.io/appium-inspector/latest/quickstart/installation Installs the Appium Inspector plugin for Appium version 3 using the Appium command-line interface. ```bash appium plugin install inspector ``` -------------------------------- ### Run AppImage (Linux) Source: https://appium.github.io/appium-inspector/latest/quickstart/installation Launches the Appium Inspector application on Linux by executing the AppImage file from the command line after setting its executable permissions. ```bash ./Appium-Inspector--linux-.AppImage ``` -------------------------------- ### Install Appium Inspector via Homebrew (macOS) Source: https://appium.github.io/appium-inspector/latest/quickstart/installation Installs the Appium Inspector desktop application on macOS using Homebrew. This method is community-supported and deprecated starting September 1st, 2026. ```bash brew install --cask appium-inspector ``` -------------------------------- ### Install Appium Inspector Plugin (Appium 2) Source: https://appium.github.io/appium-inspector/latest/quickstart/installation Installs a specific version of the Appium Inspector plugin for Appium version 2 from npm. This method is for the last compatible version. ```bash appium plugin install --source=npm appium-inspector-plugin@2025.7.3 ``` -------------------------------- ### Make AppImage Executable (Linux) Source: https://appium.github.io/appium-inspector/latest/quickstart/installation Sets the executable permission for the Appium Inspector AppImage file on Linux, allowing it to be run from the command line. ```bash chmod a+x Appium-Inspector--linux-.AppImage ``` -------------------------------- ### Access Appium Inspector URL Source: https://appium.github.io/appium-inspector/latest/quickstart/installation Opens the Appium Inspector interface in a web browser by navigating to the specified local URL. Ensure this matches the Appium server host and port. ```bash http://localhost:4723/inspector ``` -------------------------------- ### Serve Documentation Locally for Appium Inspector Source: https://appium.github.io/appium-inspector/latest/contributing Starts a local development server to view and test the documentation, with live reloading for changes. This command ensures that documentation is up-to-date and easily accessible during development. ```bash npm run dev:docs ``` -------------------------------- ### Install Documentation Dependencies for Appium Inspector Source: https://appium.github.io/appium-inspector/latest/contributing Installs the Python package dependencies required for building the project's documentation. This is a necessary step before running the documentation development server. ```bash npm run install-docs-deps ``` -------------------------------- ### Install Dependencies for Appium Inspector Source: https://appium.github.io/appium-inspector/latest/contributing Installs the necessary project dependencies using npm. This is a prerequisite for running the application in development or building it. Ensure Python and C/C++ compiler tools are installed if node-gyp encounters issues. ```bash npm ci ``` -------------------------------- ### Appium Session Boilerplate Code Generation Source: https://appium.github.io/appium-inspector/latest/session-inspector/session-info Provides example boilerplate code for creating an Appium session. It includes necessary imports, setup, and teardown for a self-contained file. Users can copy the code or change the target language via a dropdown. ```javascript const wd = require('webdriver'); const capabilities = { platformName: 'Android', 'appium:platformVersion': '13', 'appium:deviceName': 'Android Emulator', 'appium:automationName': 'UiAutomator2', 'appium:app': 'path/to/your/app.apk' }; const driver = await wd.newSession({ // Use the correct URL for your Appium server // For a local Appium server, it might be 'http://localhost:4723' // For cloud providers, consult their documentation for the correct URL hostname: 'localhost', port: 4723, path: '/', capabilities: capabilities }); // Your Appium automation code goes here await driver.deleteSession(); ``` ```python from appium import webdriver capabilities = { 'platformName': 'Android', 'appium:platformVersion': '13', 'appium:deviceName': 'Android Emulator', 'appium:automationName': 'UiAutomator2', 'appium:app': 'path/to/your/app.apk' } # Use the correct URL for your Appium server # For a local Appium server, it might be 'http://localhost:4723/wd/hub' # For cloud providers, consult their documentation for the correct URL appium_server_url = 'http://localhost:4723/wd/hub' driver = webdriver.Remote(appium_server_url, capabilities) # Your Appium automation code goes here driver.quit() ``` ```java import io.appium.java_client.AppiumDriver; import org.openqa.selenium.remote.DesiredCapabilities; import java.net.URL; public class AppiumTest { public static void main(String[] args) { DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platformName", "Android"); caps.setCapability("appium:platformVersion", "13"); caps.setCapability("appium:deviceName", "Android Emulator"); caps.setCapability("appium:automationName", "UiAutomator2"); caps.setCapability("appium:app", "path/to/your/app.apk"); AppiumDriver driver = null; try { // Use the correct URL for your Appium server // For a local Appium server, it might be 'http://localhost:4723/wd/hub' // For cloud providers, consult their documentation for the correct URL URL appiumServerUrl = new URL("http://localhost:4723/wd/hub"); driver = new AppiumDriver(appiumServerUrl, caps); // Your Appium automation code goes here } catch (Exception e) { e.printStackTrace(); } finally { if (driver != null) { driver.quit(); } } } } ``` -------------------------------- ### Link Local Plugin for Appium Inspector Source: https://appium.github.io/appium-inspector/latest/contributing Installs the `@appium/base-plugin` and links a local plugin version to your Appium server. This involves navigating to the plugins directory, installing dependencies, and then using the Appium CLI to install the plugin from a local source. ```bash cd plugins && npm install && cd .. appium plugin install --source=local plugins ``` -------------------------------- ### Bypass macOS Security Warning (Command-line) Source: https://appium.github.io/appium-inspector/latest/quickstart/installation Removes extended attributes from the Appium Inspector application bundle on macOS to bypass Gatekeeper security warnings, allowing it to run. ```bash xattr -cr "/Applications/Appium Inspector.app" ``` -------------------------------- ### Appium Inspector: Mac Session Capabilities (JSON) Source: https://appium.github.io/appium-inspector/latest/quickstart/starting-a-session Provides a basic capability set for starting a session on a Mac platform using the Mac2 automation name. This configuration is suitable for Mac applications. Consult the Mac2 driver capabilities documentation for further information. ```json { "platformName": "Mac", "appium:automationName": "Mac2" } ``` -------------------------------- ### Appium Inspector: Android Session Capabilities (JSON) Source: https://appium.github.io/appium-inspector/latest/quickstart/starting-a-session Specifies the capabilities for an Android session using the UiAutomator2 automation name. This is a basic capability set not specific to any app. Ensure the Appium server is running and accessible. ```json { "platformName": "Android", "appium:automationName": "UiAutomator2" } ``` -------------------------------- ### Appium Inspector: iOS Session Capabilities (JSON) Source: https://appium.github.io/appium-inspector/latest/quickstart/starting-a-session Defines capabilities for an iOS session with the XCUITest automation name and a placeholder for the device UDID. This configuration is for iOS and requires a valid device UDID. Refer to XCUITest driver documentation for more details. ```json { "platformName": "iOS", "appium:automationName": "XCUITest", "appium:udid": "" } ``` -------------------------------- ### Start Appium Server with CORS Enabled Source: https://appium.github.io/appium-inspector/latest/troubleshooting Enables cross-origin resource sharing for the Appium server, allowing the browser-based Inspector to make requests from a different origin. This is necessary to bypass browser security restrictions when the Inspector is accessed at a different host than the Appium server. ```shell appium --allow-cors ``` -------------------------------- ### Run Appium Inspector in Development Mode Source: https://appium.github.io/appium-inspector/latest/contributing Starts the Appium Inspector in development mode. This allows for live updates and debugging. For the Electron version, use `npm run dev:electron`. For the browser/plugin version, use `npm run dev:browser`. Note that Appium server must be launched with `--allow-cors` flag when using dev mode. ```bash npm run dev:browser ``` ```bash npm run dev:electron ``` -------------------------------- ### Preview Production Build of Appium Inspector Source: https://appium.github.io/appium-inspector/latest/contributing Builds and previews the production version of the Appium Inspector. This command allows you to test the production build locally before deployment. Available for browser, plugin, and Electron versions. ```bash npm run preview:browser ``` ```bash npm run preview:plugin ``` ```bash npm run preview:electron ``` -------------------------------- ### Build Production Version of Appium Inspector Source: https://appium.github.io/appium-inspector/latest/contributing Builds the production-ready version of the Appium Inspector for different targets. Use `npm run build:browser` for the browser version, `npm run build:plugin` for the plugin version, and `npm run build:electron` for the Electron desktop application. ```bash npm run build:browser ``` ```bash npm run build:plugin ``` ```bash npm run build:electron ``` -------------------------------- ### Run Tests for Appium Inspector Source: https://appium.github.io/appium-inspector/latest/contributing Executes various test suites for the Appium Inspector project. This includes linting, formatting, unit, integration, and end-to-end tests. Running `npm run test` executes lint, unit, and integration tests. ```bash npm run test:lint ``` ```bash npm run test:format ``` ```bash npm run test:unit ``` ```bash npm run test:integration ``` ```bash npm run test:e2e ``` ```bash npm run test ``` -------------------------------- ### Package Electron App for Appium Inspector Source: https://appium.github.io/appium-inspector/latest/contributing Builds the executable package for the desktop (Electron) version of Appium Inspector, including any necessary artifacts for your platform. This output is placed in the `/release` directory. For macOS, ensure code signing environment variables are set. ```bash npm run pack:electron ``` -------------------------------- ### Configure MJPEG Screenshotting in Appium Inspector Source: https://appium.github.io/appium-inspector/latest/session-inspector/screenshot This snippet demonstrates how to configure MJPEG session capabilities to enable automatic screenshot updates in Appium Inspector. This allows the screenshot to mirror the actual device screen even when interacting outside the Inspector. Dependencies include Appium server with MJPEG support. ```JSON { "capabilities": { "appium:mjpegServerPort": 8091, "appium:mjpegServerUrl": "http://localhost:8091" } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.