Tilted sphere with longitudinal stripes Modern Web Guides Docs Blog Toggle darkmode

Browser Launchers: Webdriver

Run tests using WebdriverIO.

Usage

  1. Make sure you have a selenium server running, either locally or remote.

  2. Add the Webdriver launcher to your test runner config and specify relevant options:

import { webdriverLauncher } from '@web/test-runner-webdriver';

module.exports = {
  browsers: [
    webdriverLauncher({
      automationProtocol: 'webdriver',
      path: '/wd/hub/',
      capabilities: {
        browserName: 'chrome',
        'goog:chromeOptions': {
          args: ['--no-sandbox', '--headless'],
        },
      },
    }),
    webdriverLauncher({
      automationProtocol: 'webdriver',
      path: '/wd/hub/',
      capabilities: {
        browserName: 'firefox',
        'moz:firefoxOptions': {
          args: ['-headless'],
        },
      },
    }),
  ],
};