Skip to content

A service that allows to continue using JSON Wire Protocol commands for WebdriverIO clients.

License

Notifications You must be signed in to change notification settings

webdriverio-community/wdio-jsonwp-service

Repository files navigation

WDIO JSONWP Service CI Audit

This service installs all legacy JSON Wire Protocol to your browser instance in cases you still need to run tests on environments that don't support WebDriver.

Installing

You can install this package via:

npm install @wdio/jsonwp-service

Configuration

In your wdio.conf.ts or wdio.conf.js add this service to the list of services:

// wdio.conf.ts
export const config: WebdriverIO.Config = {
  // ...
  services: ['jsonwp']
  // ...
}

Usage

Once set up as described, you have access to all JSON Wire Protocol commands, e.g.:

import { browser } from '@wdio/globals'

describe('my test suite', () => {
  it('can call JSONWP commands', async () => {
    // call JSONWP command
    await browser.buttonUp()
  })
})

Standalone

If you are using WebdriverIO as a standalone package you can use this service by integrating this service as following:

import { remote } from 'webdriverio'
import JSONWPService from '@wdio/jsonwp-service'

const browser = await remote({ ... })

const jsonwp = new JSONWPService()
jsonwp.before(undefined, undefined, browser)

// call JSONWP command
await browser.buttonUp()

For more information on WebdriverIO see the homepage.

About

A service that allows to continue using JSON Wire Protocol commands for WebdriverIO clients.

Resources

License

Stars

Watchers

Forks

Packages

No packages published