Neverending Prototype Mode

    @wdio/protocols
    TypeScript icon, indicating that this package has built-in type declarations

    7.19.0 • Public • Published

    WebdriverIO Protocol Helper

    This package stores the definition for various automation protocols such as WebDriver or vendor specific protocol extensions like for SauceLabs. Unless you are interested in generating a WebDriver client there should be no reason why you should need this package. This package holds the definition of the following protocols:

    Install

    To install the package, run:

    npm install @wdio/protocols

    Usage

    You can get data by importing the package as follows:

    import { WebDriverProtocol, MJsonWProtocol, JsonWProtocol, AppiumProtocol, ChromiumProtocol, SauceLabsProtocol, SeleniumProtocol } from '@wdio/protocols'
    
    /**
     * get description of session command
     */
    console.log(WebDriverProtocol['/session'].POST.description)

    TypeScript Interfaces

    The package exposes TypeScript interfaces for all protocols. You can use them for your own project as follows:

    import type { WebDriverCommands } from '@wdio/protocol'
    
    import { WebDriverCommands, WebDriverCommandsAsync } from './src'
    
    const browser = {} as WebDriverCommands
    browser.sendAlertText(true)
    // fails with "Argument of type 'boolean' is not assignable to parameter of type 'string'.ts(2345)"
    
    const asyncBrowser = {} as WebDriverCommandsAsync
    const a = await asyncBrowser.getTitle()
    type foo = typeof a // string

    For more information on WebdriverIO see the homepage.

    Install

    npm i @wdio/protocols

    DownloadsWeekly Downloads

    798,083

    Version

    7.19.0

    License

    MIT

    Unpacked Size

    347 kB

    Total Files

    43

    Last publish

    Collaborators

    • christian-bromann
    • wdio-user
    • wswebcreation-nl