JSPM

webdriverio

7.29.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1979433
  • Score
    100M100P100Q189452F
  • License MIT

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

Package Exports

  • webdriverio
  • webdriverio/build/commands/browser
  • webdriverio/build/commands/browser.js
  • webdriverio/build/commands/browser/waitUntil
  • webdriverio/build/commands/browser/waitUntil.js
  • webdriverio/build/commands/element
  • webdriverio/build/commands/element.js
  • webdriverio/build/constants
  • webdriverio/build/constants.js
  • webdriverio/build/index.js
  • webdriverio/build/multiremote
  • webdriverio/build/multiremote.js
  • webdriverio/build/utils
  • webdriverio/build/utils/index.js
  • webdriverio/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webdriverio) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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 testrunner using @wdio/cli. WebdriverIO allows 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'

let browser

;(async () => {
    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()
})().catch((err) => {
    console.error(err)
    return browser.deleteSession()
})

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

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