-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Description
The appium_get_source tool fails to retrieve the page source from an active Appium session, even though the session is confirmed to be running and appium_list_sessions returns valid session information.
Environment
- Platform: Android
- MCP Tool:
appium_get_source - Session Type: Android mobile automation
- App: CropX mobile application
Steps to Reproduce
- Start an Appium session with an Android device
- Verify active session using
appium_list_sessions- returns valid session ID - Call
appium_get_sourcewith empty parameters{} - Tool fails to return page source or returns incomplete/no data
Expected Behavior
The appium_get_source tool should return the complete XML page source of the current screen, similar to Appium's standard driver.getPageSource() command.
Expected output format:
<?xml version="1.0" encoding="UTF-8"?>
<hierarchy>
<android.widget.FrameLayout ...>
<!-- Full page source XML -->
</android.widget.FrameLayout>
</hierarchy>Actual Behavior
- The tool either returns no data, incomplete data, or throws an error
- Session appears to become "inactive" or unresponsive after the call
- Subsequent calls to
appium_get_sourcecontinue to fail - Other Appium MCP tools (like
appium_find_element,appium_click_element) work correctly
Observations
appium_list_sessionsconfirms an active session existsappium_find_elementsuccessfully locates elementsappium_click_elementsuccessfully interacts with elements- Only
appium_get_sourceappears to fail consistently
Example Session Flow
1. appium_list_sessions → ✅ Returns active session
2. appium_find_element (id: "welcome_login_button") → ✅ Success
3. appium_click_element → ✅ Success
4. appium_get_source → ❌ Fails/returns no data
5. appium_get_source (retry) → ❌ "Session seems inactive"
Impact
This issue prevents:
- Automated verification of element IDs on the current screen
- Debugging and inspection of the UI hierarchy
- Validation of expected elements after navigation
- Creating comprehensive locator verification reports
Workaround
Currently, no reliable workaround exists within the MCP toolset. Manual inspection using Appium Desktop or direct Appium client calls is required.
Additional Context
This issue was encountered while trying to verify element locators on mobile screens during automated testing workflows.
Metadata
Metadata
Assignees
Labels
No labels