包详细信息

@testplane/webdriverio

webdriverio5.7kMIT9.5.21

Next-gen browser and mobile automation test framework for Node.js

webdriverio, webdriver, selenium, appium

自述文件

WebdriverIO

Next-gen browser and mobile automation test framework for Node.js

This package provides an easy-to-manage API and a lot of syntactical sugar on top of the WebDriver specification. You can use WebdriverIO as a standalone package or via a test runner using @wdio/cli. WebdriverIO allows you to run tests locally using the WebDriver or Chrome DevTools protocol as well as remote user agents using cloud providers like Sauce Labs.

Installation

You can install WebdriverIO via NPM:

npm install webdriverio

Usage

WebdriverIO by default uses Puppeteer to automate a browser like Chrome, Firefox or Chromium Edge. So if you have Chrome installed, the following script should start a browser for you and get the title of the page:

import { remote } from 'webdriverio'

const browser = await remote({
    capabilities: { browserName: 'chrome' }
})

await browser.navigateTo('https://www.google.com/ncr')

const searchInput = await browser.$('#lst-ib')
await searchInput.setValue('WebdriverIO')

const searchBtn = await browser.$('input[value="Google Search"]')
await searchBtn.click()

console.log(await browser.getTitle()) // outputs "WebdriverIO - Google Search"

await browser.deleteSession()

See the raw protocol example using the webdriver package to get a glance at the differences.

For more information on options, multiremote usage or integration into cloud services please check out the docs.


Package Sponsors:

BrowserStack

更新日志

Changelog

Tags:

  • :boom: [Breaking Change]
  • :eyeglasses: [Spec Compliancy]
  • :rocket: [New Feature]
  • :bug: [Bug Fix]
  • :memo: [Documentation]
  • :house: [Internal]
  • :nail_care: [Polish]

Note: Gaps between patch versions are faulty, broken or test releases.

See CHANGELOG - v4.

See CHANGELOG - v5.

See CHANGELOG - v6

See CHANGELOG - v7

See CHANGELOG - v8


v9.16.0 (2025-06-23)

:eyeglasses: Spec Compliancy

:rocket: New Feature

  • wdio-config, wdio-runner, wdio-types

:bug: Bug Fix

:nail_care: Polish

  • wdio-browserstack-service
    • #14538 Added support for running accessibility on Non-browserstack infrastructure (@Bhargavi-BS)

:memo: Documentation

  • Other
  • wdio-appium-service, wdio-cli, wdio-protocols, wdio-types, webdriverio

:house: Internal

Committers: 10

v9.15.0 (2025-05-30)

:rocket: New Feature

  • wdio-logger, wdio-runner, wdio-types, webdriver, webdriverio
    • #13938 feat(runner+browserstack): Mask sensitive data for Reporters (and more) (@dprevost-LMI)
  • wdio-protocols

:bug: Bug Fix

:nail_care: Polish

:memo: Documentation

  • webdriverio

Committers: 7

v9.14.0 (2025-05-15)

:rocket: New Feature

:bug: Bug Fix

  • wdio-spec-reporter
    • #14472 chore(@wdio/spec-reporter): file name print format (@unickq)

:nail_care: Polish

  • wdio-types
    • #14474 add browserstack camera-image-injection to wdio-types capabilities (@DoreyKiss)
  • wdio-browserstack-service
    • #14466 Added changes to skip tests for mocha framework for browserstack session (@pri-gadhiya)

:house: Internal

  • wdio-types
    • #14481 feat: adding check in normalizeDoc function to make sure readmeArr is of string type (@Kauanldsbarbosa)

Committers: 5

v9.13.0 (2025-05-12)

:eyeglasses: Spec Compliancy

  • wdio-protocols

:bug: Bug Fix

  • webdriver
    • #14463 fix(webdriver): stop cloning request so await response.json() can abort properly (@dprevost-LMI)
    • #14437 Fix avoid misleading BiDi connection failure message (@Rondleysg)
  • webdriverio
    • #14449 fix(bidi-dialog): only dismiss dialogs in active browsing context (@Rondleysg)
    • #14448 fix(bidi-dialog): only accept dialogs in active browsing context (@Rondleysg)
  • wdio-utils
    • #14427 fix: disable Chrome's password manager leak detection as it can block test execution (@erwinheitzman)
  • wdio-junit-reporter

:nail_care: Polish

  • wdio-allure-reporter, wdio-concise-reporter, wdio-reporter, wdio-spec-reporter
    • #14454 feat(reporter): add browserName function and use where required (@Delta456)
  • wdio-browserstack-service

:memo: Documentation

:house: Internal

Committers: 12

v9.12.7 (2025-04-21)

:bug: Bug Fix

Committers: 2

v9.12.6 (2025-04-17)

:rocket: New Feature

  • webdriver
    • 14350 feat: introduce defineConfig function to create a typed configuration object (@erwinheitzman)

:bug: Bug Fix

:nail_care: Polish

  • webdriverio
  • wdio-browserstack-service
    • #14410 fix(@wdio/browserstack-service): node fetch() failure over HTTPS_PROXY=<proxy_url> setup (@mitya555)
  • @wdio/config
    • 14351 polish(@wdio/config): decrease waitforInterval from 500 to 100 to improve execution speed (@erwinheitzman)

Committers: 4

v9.12.5 (2025-04-11)

:eyeglasses: Spec Compliancy

  • wdio-protocols
    • #14379 feat(@wdio/protocols): Add "options" parameter to "terminateApp" command (@Nyaran)

:bug: Bug Fix

  • webdriverio
    • #14406 fix(interception): Return raw non-binary responses without metadata wrapper (@Norva-bugged)
    • #14401 fix(#14368): desync puppeteer-core peer-dep version (@Badisi)
    • #14402 fix: unexpected token '?' on older browsers (@will-stone)
    • #14403 fix(element): improve checkVisibility fallback handling in element.isDisplayed (@paymand)
  • webdriver
    • #14391 fix(webdriver): undici fetch() failure with HTTPS_PROXY=<proxy_url> setup (@mitya555)
  • wdio-browserstack-service

:nail_care: Polish

  • wdio-utils
    • #14392 fix(utils): fix not to judged as screenshot the arg of switch* (@mato533)
  • wdio-browserstack-service

:memo: Documentation

  • webdriverio

Committers: 10

v9.12.4 (2025-04-05)

:bug: Bug Fix

  • webdriver
    • #14376 fix(webdriver): add timeout-related configurable options to ProxyAgent (@mitya555)

:nail_care: Polish

:memo: Documentation

:house: Internal

Committers: 5

v9.12.3 (2025-04-03)

:bug: Bug Fix

  • webdriverio
    • #14360 fix(interception): Properly handle binary response data in WebDriverInterception (@Norva-bugged)
    • #14338 fix: Fixes isDisplayed to always use default params for checkVisibility. (@damencho)
  • Other

:memo: Documentation

:house: Internal

  • wdio-allure-reporter, wdio-browser-runner, wdio-browserstack-service, wdio-cli, wdio-config, wdio-cucumber-framework, wdio-firefox-profile-service, wdio-jasmine-framework, wdio-lighthouse-service, wdio-mocha-framework, wdio-protocols, wdio-runner, wdio-types, wdio-utils, webdriver, webdriverio

Committers: 8

v9.12.2 (2025-03-27)

:rocket: New Feature

  • webdriver
    • #14304 feat(webdriver): support WebSocket options at the BiDi connection (@mato533)

:bug: Bug Fix

:nail_care: Polish

:memo: Documentation

  • Other
  • wdio-cli, wdio-protocols, wdio-sauce-service, wdio-spec-reporter, wdio-types
  • wdio-spec-reporter
    • #14306 updated spec reporter readme - sharable links value with valid sauce sharable link (@vjuturu)

Committers: 13

v9.12.1 (2025-03-20)

:bug: Bug Fix

:nail_care: Polish

  • wdio-cli
  • webdriver
  • wdio-browser-runner, webdriver
    • #14259 fix: Try to resolve ip addresses if no BiDi connection to the host could be established (@mykola-mokhnach)

:memo: Documentation

:house: Internal

Committers: 11

v9.12.0 (2025-03-11)

:rocket: New Feature

:nail_care: Polish

  • webdriverio

:memo: Documentation

  • Other
  • webdriverio
    • #14263 docs: mention that Chrome DevTools protocol is not installed by default and what package is required (@ianrenauld)

Committers: 4

v9.11.0 (2025-03-05)

:rocket: New Feature

  • wdio-cucumber-framework, wdio-reporter, wdio-spec-reporter

:bug: Bug Fix

:nail_care: Polish

:memo: Documentation

:house: Internal

  • #14215 fix(webdriverio): fix failing e2e tests due to language and timezone differences (@erwinheitzman)

Committers: 6

v9.10.1 (2025-02-25)

:bug: Bug Fix

  • wdio-junit-reporter, wdio-reporter, wdio-runner, wdio-spec-reporter, wdio-types, webdriver
  • wdio-browser-runner, wdio-cli, wdio-config, wdio-runner, wdio-utils, webdriverio

Committers: 2

v9.10.0 (2025-02-22)

:rocket: New Feature

:bug: Bug Fix

  • wdio-sauce-service

:nail_care: Polish

  • webdriverio
  • wdio-sauce-service
    • #14209 fix: Remove unused typings file on sauce service (@Nyaran)
    • #14207 Remove default values for tlsPassthroughDomains on sauce service (@Nyaran)

Committers: 3

v9.9.3 (2025-02-18)

:bug: Bug Fix

:nail_care: Polish

  • wdio-browserstack-service

Committers: 2

v9.9.2 (2025-02-18)

:bug: Bug Fix

:memo: Documentation

Committers: 3

v9.9.1 (2025-02-14)

:bug: Bug Fix

  • webdriverio
  • wdio-webdriver-mock-service, webdriverio

:nail_care: Polish

  • eslint-plugin-wdio
  • wdio-browser-runner, wdio-globals, wdio-jasmine-framework, wdio-runner

Committers: 2

v9.8.0 (2025-02-06)

:bug: Bug Fix

:nail_care: Polish

  • wdio-sauce-service, wdio-spec-reporter
    • #14130 Add support for Sauce Connect 5, drop support for Sauce Connect 4 (@budziam)
  • wdio-cli

Committers: 3

v9.7.3 (2025-02-05)

:bug: Bug Fix

:nail_care: Polish

  • wdio-cli

Committers: 2

v9.7.2 (2025-01-29)

:bug: Bug Fix

:nail_care: Polish

  • wdio-utils, webdriverio

:memo: Documentation

Committers: 4

v9.7.1 (2025-01-25)

:bug: Bug Fix

:memo: Documentation

  • wdio-cli
    • #14111 updating constants and services lists with wdio-roku-service refs (@jonyet)

Committers: 2

v9.7.0 (2025-01-24)

:bug: Bug Fix

:nail_care: Polish

Committers: 2

v9.6.4 (2025-01-24)

:nail_care: Polish

Committers: 1

v9.6.3 (2025-01-23)

:bug: Bug Fix

Committers: 1

v9.6.2 (2025-01-23)

:bug: Bug Fix

  • wdio-webdriver-mock-service, webdriverio
  • wdio-cli, wdio-types, webdriverio
  • wdio-mocha-framework, wdio-runner

:memo: Documentation

Committers: 2

v9.6.1 (2025-01-23)

:bug: Bug Fix

Committers: 2

v9.6.0 (2025-01-21)

:rocket: New Feature

  • wdio-browserstack-service
  • webdriver, webdriverio

:bug: Bug Fix

:nail_care: Polish

  • webdriverio

:memo: Documentation

Committers: 4

v9.5.7 (2025-01-12)

:bug: Bug Fix

Committers: 1

v9.5.6 (2025-01-12)

:bug: Bug Fix

Committers: 1

v9.5.5 (2025-01-10)

:bug: Bug Fix

Committers: 1

v9.5.4 (2025-01-10)

:bug: Bug Fix

:nail_care: Polish

Committers: 1

v9.5.3 (2025-01-09)

:bug: Bug Fix

Committers: 1

v9.5.2 (2025-01-09)

:bug: Bug Fix

:memo: Documentation

:house: Internal

Committers: 3

v9.5.1 (2025-01-03)

:bug: Bug Fix

  • webdriverio
  • wdio-appium-service
    • #13913 chore(appium-service): filter out Debugger attached as errorMessage (@Delta456)

:nail_care: Polish

  • wdio-appium-service
  • webdriver
    • #14020 fix(webdriver): allow BiDiCore to send declared headers (@navin772)

Committers: 4

v9.5.0 (2024-12-30)

:rocket: New Feature

:bug: Bug Fix

:nail_care: Polish

Committers: 2

v9.4.5 (2024-12-19)

:nail_care: Polish

Committers: 1

v9.4.4 (2024-12-19)

:nail_care: Polish

  • wdio-testingbot-service

:house: Internal

  • eslint-plugin-wdio, wdio-allure-reporter, wdio-appium-service, wdio-browser-runner, wdio-browserstack-service, wdio-cli, wdio-config, wdio-cucumber-framework, wdio-firefox-profile-service, wdio-globals, wdio-jasmine-framework, wdio-json-reporter, wdio-junit-reporter, wdio-lighthouse-service, wdio-local-runner, wdio-logger, wdio-mocha-framework, wdio-protocols, wdio-repl, wdio-reporter, wdio-runner, wdio-sauce-service, wdio-shared-store-service, wdio-smoke-test-cjs-service, wdio-smoke-test-service, wdio-spec-reporter, wdio-static-server-service, wdio-sumologic-reporter, wdio-testingbot-service, wdio-types, wdio-utils, wdio-webdriver-mock-service, webdriver, webdriverio

Committers: 2

v9.4.3 (2024-12-17)

:bug: Bug Fix

  • wdio-cli, wdio-config, wdio-local-runner, webdriver
  • wdio-utils, webdriver
  • wdio-types
    • #13988 wdio-types: add platformVersion field for BrowserStackCapabilities (@Delta456)

:nail_care: Polish

  • wdio-utils

Committers: 4

v9.4.2 (2024-12-12)

:bug: Bug Fix

:nail_care: Polish

  • wdio-cli
  • wdio-utils, webdriverio
  • wdio-browserstack-service, wdio-types

:memo: Documentation

Committers: 7

v9.4.1 (2024-11-27)

:bug: Bug Fix

Committers: 1

v9.4.0 (2024-11-26)

:rocket: New Feature

:bug: Bug Fix

:nail_care: Polish

Committers: 2

v9.3.1 (2024-11-22)

:rocket: New Feature

:nail_care: Polish

  • wdio-cucumber-framework
  • webdriverio

Committers: 3

v9.3.0 (2024-11-20)

:rocket: New Feature

:bug: Bug Fix

:nail_care: Polish

:memo: Documentation

  • #13903 chore(docs): add info setting up maxInstances and specs in docs (@harsha509)

Committers: 3

v9.2.15 (2024-11-14)

:nail_care: Polish

  • wdio-runner
    • #13878 fix(@wdio/runner): Respect excludes in capabilities in multiremote case. (@damencho)

Committers: 1

v9.2.14 (2024-11-14)

:rocket: New Feature

:nail_care: Polish

  • wdio-cucumber-framework, wdio-reporter, wdio-spec-reporter

Committers: 2

v9.2.12 (2024-11-11)

:bug: Bug Fix

:nail_care: Polish

Committers: 1

v9.2.11 (2024-11-07)

:bug: Bug Fix

  • webdriverio
    • #13863 fix(webdriverio): properly handle unresolved element on switchFrame input in non-BIDI scenario (@gavvvr)
    • #13857 fix(webdriverio): switchWindow supports exact window handle match (@jan-molak)
  • wdio-browserstack-service
    • #13858 fix: stacktrace for testobservability (@07souravkunda)
    • #13833 Build Unification - WDIO Mocha, Cucumber, Jasmine - Browserstack Test Observability, Accessibility & Percy (@amaanbs)

:nail_care: Polish

:memo: Documentation

Committers: 6

v9.2.10 (2024-11-05)

:bug: Bug Fix

:nail_care: Polish

Committers: 2

v9.2.9 (2024-11-01)

:bug: Bug Fix

  • wdio-appium-service

Committers: 1

v9.2.8 (2024-11-01)

:bug: Bug Fix

  • webdriverio
  • wdio-utils
    • #13796 feat(chromedriver): set NODE_OPTIONS empty to allow electron to work (@Delta456)

:nail_care: Polish

Committers: 2

v9.2.5 (2024-10-29)

:bug: Bug Fix

Committers: 2

v9.2.4 (2024-10-28)

:bug: Bug Fix

Committers: 1

v9.2.2 (2024-10-28)

:bug: Bug Fix

:nail_care: Polish

  • wdio-appium-service
  • wdio-protocols
  • webdriverio
    • #13793 feat: enhance newWindow function to support 'tab' or 'window' types (@harsha509)

:memo: Documentation

:house: Internal

Committers: 11

v9.2.0 (2024-10-12)

:house: Internal

Committers: 2

v9.1.6 (2024-10-10)

:bug: Bug Fix

Committers: 1

v9.1.5 (2024-10-10)

:bug: Bug Fix

Committers: 1

v9.1.4 (2024-10-09)

:bug: Bug Fix

  • webdriverio
    • #13751 fix(webdriverio): make name polyfill compatible with old browsers (@mhassan1)

Committers: 2

v9.1.3 (2024-10-08)

:bug: Bug Fix

:nail_care: Polish

  • webdriverio
  • webdriver

:house: Internal

Committers: 5

v9.1.2 (2024-09-28)

:bug: Bug Fix

:nail_care: Polish

  • wdio-types, webdriver
  • wdio-cli, wdio-sauce-service, wdio-spec-reporter, wdio-types, webdriverio

Committers: 3

v9.1.1 (2024-09-26)

:bug: Bug Fix

:nail_care: Polish

:memo: Documentation

Committers: 4

v9.1.0 (2024-09-24)

:rocket: New Feature

:bug: Bug Fix

:nail_care: Polish

  • wdio-utils, webdriver
  • wdio-appium-service, wdio-sauce-service, wdio-testingbot-service, wdio-utils, webdriver, webdriverio
  • wdio-spec-reporter, wdio-types, webdriverio
  • wdio-junit-reporter
  • wdio-browserstack-service

:memo: Documentation

Committers: 13

v9.0.8 (2024-09-05)

:rocket: New Feature

:bug: Bug Fix

  • webdriverio
  • Other
  • eslint-plugin-wdio, wdio-allure-reporter, wdio-appium-service, wdio-browser-runner, wdio-browserstack-service, wdio-cli, wdio-concise-reporter, wdio-config, wdio-cucumber-framework, wdio-dot-reporter, wdio-firefox-profile-service, wdio-globals, wdio-jasmine-framework, wdio-junit-reporter, wdio-lighthouse-service, wdio-local-runner, wdio-logger, wdio-mocha-framework, wdio-repl, wdio-reporter, wdio-runner, wdio-sauce-service, wdio-shared-store-service, wdio-smoke-test-cjs-service, wdio-smoke-test-reporter, wdio-smoke-test-service, wdio-spec-reporter, wdio-static-server-service, wdio-sumologic-reporter, wdio-testingbot-service, wdio-types, wdio-utils, wdio-webdriver-mock-service, webdriver, webdriverio
  • wdio-browser-runner

:nail_care: Polish

  • wdio-browserstack-service

:memo: Documentation

Committers: 8

v9.0.7 (2024-08-21)

:bug: Bug Fix

Committers: 1

v9.0.6 (2024-08-21)

:bug: Bug Fix

  • webdriver
  • webdriver, webdriverio
  • wdio-utils
    • #13426 fix(@wdio/cli): correctly detect chrome headless shell as chrome #13390 (@BorisOsipov)

Committers: 2

v9.0.5 (2024-08-20)

:bug: Bug Fix

:nail_care: Polish

  • webdriver

:memo: Documentation

Committers: 2

v9.0.4 (2024-08-19)

:bug: Bug Fix

:house: Internal

  • wdio-browser-runner, wdio-cucumber-framework, wdio-mocha-framework, wdio-smoke-test-cjs-service, wdio-smoke-test-service, wdio-utils, webdriverio
  • Other

Committers: 3

v9.0.3 (2024-08-16)

:bug: Bug Fix

Committers: 1

v9.0.2 (2024-08-16)

:bug: Bug Fix

Committers: 2

v9.0.1 (2024-08-15)

:bug: Bug Fix

  • wdio-browser-runner, webdriverio

Committers: 1

v9.0.0 (2024-08-15)

:boom: Breaking Change

  • wdio-cli, wdio-devtools-service, wdio-lighthouse-service, wdio-utils, webdriver, webdriverio
  • wdio-allure-reporter, wdio-appium-service, wdio-browser-runner, wdio-browserstack-service, wdio-cli, wdio-concise-reporter, wdio-config, wdio-cucumber-framework, wdio-devtools-service, wdio-firefox-profile-service, wdio-jasmine-framework, wdio-json-reporter, wdio-junit-reporter, wdio-local-runner, wdio-mocha-framework, wdio-reporter, wdio-runner, wdio-sauce-service, wdio-shared-store-service, wdio-spec-reporter, wdio-testingbot-service, wdio-types, wdio-utils, wdio-webdriver-mock-service, webdriver, webdriverio
  • @wdio/protocols
  • webdriverio

:rocket: New Feature

:bug: Bug Fix

:nail_care: Polish

  • webdriver
  • wdio-cli, wdio-config, wdio-local-runner, wdio-runner, wdio-types, webdriverio

:house: Internal

Committers: 5