Skip to content

feat: Add multi-display automation commands to Android driver#942

Open
ccxj wants to merge 1 commit intoappium:masterfrom
ccxj:android-multi-display-support
Open

feat: Add multi-display automation commands to Android driver#942
ccxj wants to merge 1 commit intoappium:masterfrom
ccxj:android-multi-display-support

Conversation

@ccxj
Copy link
Copy Markdown

@ccxj ccxj commented Nov 24, 2025

feat: Add multi-display automation commands to Android driver

Description

Adds client-side implementation for multi-display automation, enabling element location and interaction across multiple Android displays.

New Commands

mobile: findElementOnDisplay

Find single element on specific display

  • Params: selector, displayIndex, timeout, context
  • Validation: Type checking and parameter normalization

mobile: findElementsOnDisplay

Find multiple elements on specific display

  • Params: selector, displayIndex, timeout, context
  • Returns: Array of elements

mobile: getDisplayInfo

Retrieve display topology information

  • Params: None

mobile: getPageSourceOnDisplay

Get page source from specific display

  • Params: displayIndex (optional)

Technical Details

  • Robust parameter validation and error handling
  • Automatic type conversion for display indices
  • Default timeout management (1000ms)
  • RESTful endpoint integration with uiautomator2 server

Testing

  • Verified parameter validation
  • Confirmed endpoint mapping correctness
  • Validated error handling scenarios

- Add mobileFindElementOnDisplay command
- Add mobileFindElementsOnDisplay command
- Add mobileGetDisplayInfo command
- Add mobileGetPageSourceOnDisplay command
- Support displayIndex parameter for display selection"
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Missing ID CLA Not Signed

@KazuCocoa
Copy link
Copy Markdown
Member

As appium/appium-uiautomator2-server#729 (comment), could you explain the difference between currentDisplayId settings, and add this implementation's behavior in the README as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants