Package Exports
- webdriverio
- webdriverio/protocol-stub
- webdriverio/scripts/customElement.d.ts
- webdriverio/scripts/customElement.d.ts.map
- webdriverio/scripts/customElement.js
- webdriverio/scripts/elementContains.d.ts
- webdriverio/scripts/elementContains.d.ts.map
- webdriverio/scripts/elementContains.js
- webdriverio/scripts/getHTML.d.ts
- webdriverio/scripts/getHTML.d.ts.map
- webdriverio/scripts/getHTML.js
- webdriverio/scripts/getHTMLShadow.d.ts
- webdriverio/scripts/getHTMLShadow.d.ts.map
- webdriverio/scripts/getHTMLShadow.js
- webdriverio/scripts/getProperty.d.ts
- webdriverio/scripts/getProperty.d.ts.map
- webdriverio/scripts/getProperty.js
- webdriverio/scripts/isDescendant.d.ts
- webdriverio/scripts/isDescendant.d.ts.map
- webdriverio/scripts/isDescendant.js
- webdriverio/scripts/isElementClickable.d.ts
- webdriverio/scripts/isElementClickable.d.ts.map
- webdriverio/scripts/isElementClickable.js
- webdriverio/scripts/isElementDisplayed.d.ts
- webdriverio/scripts/isElementDisplayed.d.ts.map
- webdriverio/scripts/isElementDisplayed.js
- webdriverio/scripts/isElementInViewport.d.ts
- webdriverio/scripts/isElementInViewport.d.ts.map
- webdriverio/scripts/isElementInViewport.js
- webdriverio/scripts/isElementStable.d.ts
- webdriverio/scripts/isElementStable.d.ts.map
- webdriverio/scripts/isElementStable.js
- webdriverio/scripts/isFocused.d.ts
- webdriverio/scripts/isFocused.d.ts.map
- webdriverio/scripts/isFocused.js
- webdriverio/scripts/newWindow.d.ts
- webdriverio/scripts/newWindow.d.ts.map
- webdriverio/scripts/newWindow.js
- webdriverio/scripts/resq.d.ts
- webdriverio/scripts/resq.d.ts.map
- webdriverio/scripts/resq.js
- webdriverio/scripts/shadowFnFactory.d.ts
- webdriverio/scripts/shadowFnFactory.d.ts.map
- webdriverio/scripts/shadowFnFactory.js
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 test runner using @wdio/cli. WebdriverIO allows you to run tests locally using the WebDriver as well as remote user agents using cloud providers like Sauce Labs.
Installation
You can install WebdriverIO via NPM:
npm install webdriverioUsage
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.