WebdriverIO icon

WebdriverIO

Execute WebdriverIO commands for browser and mobile automation

Overview

This node enables automation of browser and mobile applications using WebdriverIO commands. It supports starting and ending WebdriverIO sessions as well as executing various actions within an active session. Typical use cases include automated UI testing, app interaction, and custom command execution on Android or iOS devices.

For example, you can start a session on an Android device, perform clicks or input text on app elements identified by selectors, retrieve element text, wait for elements to appear, execute custom WebdriverIO commands, and finally end the session cleanly.

Properties

Name Meaning
Timeouts Configuration of various timeout settings in milliseconds:
- Command Timeout (default 60000 ms)
- Connection Timeout (default 120000 ms)
- Implicit Timeout (default 0 ms)
- Page Load Timeout (default 300000 ms)
Android Options Android-specific session options:
- No Reset: avoid resetting app state before session
- Full Reset: perform complete reset and clean app data
- System Port: port number for device communication (default 8200)
- Auto Grant Permissions: automatically grant permissions on app install (default true)
iOS Options iOS-specific session options:
- Webkit Debug Proxy Port (default 8100)
- Update WDA Bundle ID: bundle ID for WebDriverAgent
- No Reset: avoid resetting app state before session
- Full Reset: perform complete reset
Advanced Options Additional advanced configuration:
- Custom Capabilities: JSON string of capabilities merged with defaults
- Max Instances: max parallel running sessions (default 1)
- Use WebdriverIO Service: toggle usage of a WebdriverIO service
- Service Name: name of the WebdriverIO service to use (shown if service enabled)

Output

The node outputs JSON objects containing:

  • For Start Session operation:

    • sessionId: The unique identifier of the started WebdriverIO session.
    • success: Boolean indicating successful session start.
    • message: Confirmation message.
  • For End Session operation:

    • success: Boolean indicating successful session termination.
    • message: Confirmation message.
  • For Execute Action operation:

    • result: Object containing the result of the executed action, e.g.:
      • { clicked: true, selector: "selectorString" } for click actions.
      • { valueSet: true, selector: "selectorString", value: "inputValue" } for setting values.
      • { text: "elementText", selector: "selectorString" } for getting text.
      • { found: true/false, selector: "selectorString" } for finding elements.
      • { waited: true, selector: "selectorString" } for waiting for elements.
      • Result of custom commands as returned by WebdriverIO.
    • success: Boolean indicating successful action execution.

If binary data were involved, it would be summarized here, but this node focuses on JSON results from WebdriverIO commands.

Dependencies

  • Requires an Appium server URL and credentials with appropriate API authentication token to connect.
  • Depends on the WebdriverIO library for session management and command execution.
  • Needs proper configuration of platform-specific options (Android/iOS) and timeouts.
  • Environment must have access to the specified Appium server.

Troubleshooting

  • No active WebdriverIO session found. Start a session first.
    This error occurs if you try to execute actions or end a session without having started one. Always start a session before other operations.

  • Invalid Appium Server URL:
    Ensure the Appium server URL is correctly formatted and reachable.

  • Invalid command arguments JSON:
    When executing custom commands, the arguments must be valid JSON arrays. Check syntax carefully.

  • Session cleanup errors:
    Occasionally, errors may occur when closing sessions; these are logged but do not stop workflow execution.

  • Timeouts:
    Adjust timeout properties if commands or connections take longer than expected.

Links and References

Discussion