Overview
This node enables automation of browser and mobile app interactions using WebdriverIO commands. It is designed to start and end WebdriverIO sessions and execute various actions within those sessions, such as clicking elements, setting values, retrieving text, finding elements, waiting for elements, or running custom WebdriverIO commands.
Common scenarios include:
- Automating UI tests on Android or iOS apps.
- Performing browser automation tasks like clicking buttons, filling forms, or extracting data.
- Running custom WebdriverIO commands for advanced automation needs.
For example, you could use this node to start a session on an Android device, click a button identified by its accessibility ID, retrieve the text from a label, and then end the session.
Properties
| Name | Meaning |
|---|---|
| Timeouts | Configuration of various timeouts in milliseconds: Command Timeout, Connection Timeout, Implicit Wait, Page Load Timeout. |
| Android Options | Android-specific settings including No Reset, Full Reset, System Port, Auto Grant Permissions. |
| iOS Options | iOS-specific settings including Webkit Debug Proxy Port, Update WDA Bundle ID, No Reset, Full Reset. |
| Advanced Options | Advanced configuration such as custom capabilities (JSON), max parallel instances, usage of WebdriverIO service, and service name. |
| Action Type | The type of action to perform during execution. Options: Click Element, Execute Custom Command, Find Element, Get Text, Set Value, Wait For Element. |
| Selector Type | The selector strategy to locate elements. Options: Accessibility ID, Class Name, CSS Selector, ID, XPath. |
| Selector Value | The actual selector string used to find the element. |
| Value | The input value to set into an element (used with Set Value action). |
| Command | The custom WebdriverIO command to execute (used with Execute Custom Command action). |
| Command Arguments | JSON array of arguments to pass to the custom command (used with Execute Custom Command action). |
Output
The node outputs an array of JSON objects corresponding to each input item processed. The structure varies depending on the operation:
- Start Session: Outputs the original input data plus
sessionId,success: true, and a success message. - End Session: Outputs the original input data plus
success: trueand a success message. - Execute Action: Outputs the original input data plus a
resultobject describing the outcome of the action andsuccess: true. Theresultcontent depends on the action type:clickElement:{ clicked: true, selector: <selector> }setValue:{ valueSet: true, selector: <selector>, value: <inputValue> }getText:{ text: <retrievedText>, selector: <selector> }findElement:{ found: <boolean>, selector: <selector> }waitForElement:{ waited: true, selector: <selector> }executeCustomCommand: The return value of the custom command executed.
No binary data output is produced by this node.
Dependencies
- Requires an active Appium server URL and credentials containing necessary API authentication tokens.
- Depends on the WebdriverIO library for executing commands.
- Needs proper configuration of platform-specific options (Android/iOS) and timeouts.
- The node expects valid JSON for custom capabilities and custom command arguments.
Troubleshooting
- Invalid Appium Server URL: If the Appium server URL is malformed, the node throws an error indicating the URL is invalid. Ensure the URL is correctly formatted.
- No Active Session: Attempting to execute actions or end a session without starting one first results in an error. Always start a session before performing actions.
- Invalid JSON in Command Arguments: When executing a custom command, if the JSON for arguments is invalid, an error is thrown. Validate JSON syntax before input.
- Selector Not Found: Actions relying on selectors may fail if the selector does not match any element. Verify selector correctness and availability of the element.
- Session Cleanup Errors: Errors during session deletion are logged but do not stop execution; ensure sessions are properly closed to avoid resource leaks.