Overview
This node enables automation of browser and mobile app interactions using WebdriverIO, a popular automation framework. Specifically, the "Start Session" operation initiates a new WebdriverIO session targeting either an Android or iOS device/app. This is useful for automating UI testing, app interaction, or any scenario requiring programmatic control over mobile devices.
Typical use cases include:
- Starting an automated test session on a specified Android or iOS app.
- Preparing a device environment before running further automated commands.
- Integrating mobile app automation into larger workflows for continuous integration or monitoring.
For example, you can start a session on an Android device specifying the app package and activity to launch, or on an iOS device by providing the app's bundle ID.
Properties
| Name | Meaning |
|---|---|
| Platform Name | The platform to automate. Options: Android, iOS. |
| Device Name | The name of the device to automate (e.g., emulator or physical device identifier). |
| App Settings | Platform-specific app settings: - For Android: specify App Package (the app's package name) and App Activity (the activity to start). - For iOS: specify Bundle ID (the app's bundle identifier). |
| Timeouts | Timeout configurations in milliseconds: - Command Timeout: default timeout for all commands. - Connection Timeout: timeout for connecting to the Appium server. - Implicit Timeout: implicit wait time. - Page Load Timeout: timeout for page loads. |
| Android Options | Android-specific options: - No Reset: whether to avoid resetting app state before session. - Full Reset: whether to perform a complete reset and clean app data. - System Port: port for device communication. - Auto Grant Permissions: automatically grant permissions on app install. |
| iOS Options | iOS-specific options: - Webkit Debug Proxy Port: port for WebKit Debug Proxy. - Update WDA Bundle ID: bundle ID for WebDriverAgent. - No Reset: avoid resetting app state before session. - Full Reset: perform a complete reset. |
| Advanced Options | Additional advanced settings: - Custom Capabilities: JSON string of custom capabilities merged with defaults. - Max Instances: maximum number of parallel sessions. - Use WebdriverIO Service: toggle to use a WebdriverIO service. - Service Name: name of the WebdriverIO service to use (shown if service enabled). |
Output
The output JSON object for the "Start Session" operation includes:
- All input item JSON fields passed through.
sessionId: The unique identifier of the started WebdriverIO session.success: Boolean indicating the session was started successfully (true).message: A success message string confirming the session start.
Example output snippet:
{
"sessionId": "some-session-id",
"success": true,
"message": "WebdriverIO session started successfully"
}
No binary data output is produced by this operation.
Dependencies
- Requires an active Appium server URL configured via credentials.
- Needs an API authentication token or key for the Appium server (configured as credentials in n8n).
- Uses WebdriverIO library internally to manage sessions.
- The Appium server must be accessible at the provided hostname and port.
- Proper device/emulator setup matching the specified platform and device name is required.
Troubleshooting
- Invalid Appium Server URL: If the Appium server URL is malformed or unreachable, the node throws an error indicating invalid URL. Verify the URL format and network connectivity.
- Session Start Failures: Incorrect app package/activity (Android) or bundle ID (iOS) may cause session start failures. Double-check these values.
- Port Conflicts: Specified system ports or debug proxy ports might conflict with other services. Adjust ports if connection issues occur.
- Missing Credentials: Ensure that the required API authentication credentials are properly configured in n8n.
- Timeouts: If commands time out, consider increasing the timeout values in the properties.
- Device Not Found: The device name must correspond to a connected or available device/emulator; otherwise, session start will fail.