Overview
Android commands provide functionality for:- Launching and controlling Android applications
- Interacting with UI elements (taps, swipes, inputs)
- Extracting text and content from app screens
- Managing app state and navigation
- Handling Android-specific UI components
Available Commands
Android commands are organized by functionality. Common command types include:- App Launch: Launch Android applications
- Element Interaction: Tap, swipe, and interact with UI elements
- Content Extraction: Extract text and attributes from app elements
- Navigation: Navigate through app screens and flows
Common Use Cases
- Mobile App Testing: Automate testing of Android applications
- Data Extraction: Extract data from mobile apps
- App Automation: Automate repetitive app interactions
- UI Testing: Test user interface elements and flows
- Content Scraping: Scrape content from mobile applications
Command Parameters
Android commands typically support the following parameters:| Parameter | Type | Description | Required |
|---|---|---|---|
| packageName | string | Android app package name | Yes (for app launch) |
| activityName | string | Android activity name | No |
| elementLocator | object | Element locator configuration | Yes (for interaction commands) |
| timeout | number | Maximum wait time in milliseconds | No |
| action | string | Action type (tap, swipe, input, etc.) | Yes (for interaction commands) |
Element Locators
Android commands use element locators to target specific UI elements:Common Locator Types
- ID: Target elements by resource ID
- Text: Target elements by displayed text
- XPath: Use XPath expressions for complex targeting
- Class Name: Target elements by class name
Best Practices
- Use Stable Locators: Prefer resource IDs over text-based locators
- Handle App State: Account for app loading and state changes
- Set Appropriate Timeouts: Configure timeouts for app interactions
- Test on Multiple Devices: Verify commands work across different Android versions
- Handle Permissions: Account for app permissions and dialogs
Related Commands
- Interaction Commands - General interaction commands
- Parse Commands - Parse extracted app content
- Validation Commands - Validate extracted content