{"name":"expect-webdriverio","version":"5.3.2","keywords":["expect-webdriverio","expect","webdriverio","wdio"],"author":{"name":"Mykola Grybyk","email":"mykola.grybyk@gmail.com"},"license":"MIT","_id":"expect-webdriverio@5.3.2","maintainers":[{"name":"christian-bromann","email":"mail@bromann.dev"},{"name":"wdio-user","email":"bot@webdriver.io"},{"name":"wswebcreation-nl","email":"wim@wswebcreation.nl"},{"name":"willbrock","email":"wpbrock@gmail.com"},{"name":"mgrybyk","email":"mykola.grybyk@gmail.com"},{"name":"klamping","email":"me@klamp.in"},{"name":"abjerstedt","email":"abjerstedt@gmail.com"},{"name":"erwinheitzman","email":"erwin.heitzman.npm@gmail.com"}],"homepage":"https://webdriver.io","bugs":{"url":"https://github.com/webdriverio/expect-webdriverio/issues"},"dist":{"shasum":"f1c5b3634de4952c026f19eb90bbf76b3f52656a","tarball":"http://registry-npm.ywwl.com/expect-webdriverio/download/expect-webdriverio-5.3.2.tgz","fileCount":54,"integrity":"sha512-rWJtfBzzH7zf44eCmD9ode5PYAEG7jwBK95DdDz2DKHHtdLaquTt5e4XwwmGrdcT62B5DXKRrFITecJ1qcp+UA==","signatures":[{"sig":"MEYCIQDLq6cbOQIxF9Kbr7rAXTRrgOIe01XY6imRteZ/saLroAIhAIHmdPRr72SkhR/lkll0lNdK6lGYIN38nNJtINCId7h0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/expect-webdriverio@5.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":107838,"size":20979,"noattachment":false,"key":"/expect-webdriverio/-/expect-webdriverio-5.3.2.tgz"},"type":"module","types":"./types/standalone.d.ts","module":"./lib/index.js","engines":{"node":">=18 || >=20 || >=22"},"exports":{".":[{"types":"./types/standalone.d.ts","import":"./lib/index.js"},"./lib/index.js"],"./jest":[{"types":"./jest.d.ts"}],"./types":"./types/jest-global.d.ts"},"gitHead":"bf40f270633de48b93365283018c9d872ddabfa3","scripts":{"ts":"run-s ts:*","test":"run-s test:*","build":"run-s clean compile","clean":"run-p clean:*","watch":"npm run compile -- --watch","compile":"tsc --build tsconfig.build.json","prepare":"husky install","ts:jest":"cd test-types/jest && tsc -p ./tsconfig.json --incremental","test:lint":"eslint .","test:unit":"vitest --run","test:types":"node test-types/copy && npm run ts && npm run clean:tests","ts:default":"cd test-types/default && tsc -p ./tsconfig.json --incremental","ts:jasmine":"cd test-types/jasmine && tsc -p ./tsconfig.json --incremental","clean:build":"rimraf ./lib","clean:tests":"rimraf test-types/**/node_modules && rimraf test-types/**/dist"},"_npmUser":{"name":"wdio-user","actor":{"name":"wdio-user","type":"user","email":"bot@webdriver.io"},"email":"bot@webdriver.io"},"repository":{"url":"git+https://github.com/webdriverio/expect-webdriverio.git","type":"git"},"_npmVersion":"10.8.2","description":"WebdriverIO Assertion Library","directories":{},"_nodeVersion":"20.19.2","dependencies":{"expect":"^30.0.0","lodash.isequal":"^4.5.0","@vitest/snapshot":"^3.2.4","jest-matcher-utils":"^30.0.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","husky":"^9.1.7","eslint":"^9.29.0","rimraf":"^6.0.1","vitest":"^3.2.4","shelljs":"^0.10.0","release-it":"^19.0.3","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.3","@wdio/types":"^9.15.0","webdriverio":"^9.15.0","@types/debug":"^4.1.12","@wdio/eslint":"^0.1.1","npm-run-all2":"^8.0.4","@vitest/coverage-v8":"^3.2.4","@types/lodash.isequal":"^4.5.8"},"peerDependencies":{"webdriverio":"^9.0.0","@wdio/logger":"^9.0.0","@wdio/globals":"^9.0.0"},"typeScriptVersion":"3.8.3","peerDependenciesMeta":{"webdriverio":{"optional":false},"@wdio/logger":{"optional":false},"@wdio/globals":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/expect-webdriverio_5.3.2_1750278153621_0.9984113934634262","host":"s3://npm-registry-packages-npm-production"},"readme":"# expect-webdriverio [![Test](https://github.com/webdriverio/expect-webdriverio/actions/workflows/test.yml/badge.svg)](https://github.com/webdriverio/expect-webdriverio/actions/workflows/test.yml)\n\n> [!IMPORTANT]\n> This branch is v8 (WebdriverIO v10), not released yet.\n\n| expect-webdriverio | WebdriverIO | Node.js | Status | Docs |\n| --- | --- | --- | --- | --- |\n| v8 | v10 | ≥ 22.19.0 | In development | This README |\n| v7 | v9 (≥ 9.31.5) | ≥ 20 | Latest release, fixes only | [v7 README](https://github.com/webdriverio/expect-webdriverio/blob/v7/README.md) |\n\n###### [API](docs/API.md) | [Multiple Elements](docs/MultipleElements.md) | [Multi-remote](docs/MultiRemote.md) | [Frameworks](docs/Framework.md) | [TypeScript / JS Autocomplete](docs/Types.md) | [Examples](docs/Examples.md) | [Extending Matchers](docs/CustomMatchers.md) | [Migration from v7](docs/Migrations.md)\n\n> [WebdriverIO](https://webdriver.io/) assertion library inspired by [expect](https://www.npmjs.com/package/expect)\n\n## Key Features\n\n- [Waits](docs/API.md#default-options) for expectations to succeed\n- Supports single element `$()` & [multiple elements](docs/MultipleElements.md) `$$()`\n- Supports [multi-remote](docs/MultiRemote.md) browsers & elements, with one expected value per browser instance\n- Detailed [error messages](#error-messages)\n- Works in Mocha, Cucumber, Jest, and Jasmine\n- Built-in [types](docs/Types.md) for TypeScript and JS autocompletion\n\n## Installation\n\n1. `npm install expect-webdriverio`\n2. Install your test framework adapter (if not already set up via WDIO testrunner):\n   - **Mocha** (default): `npm install @wdio/mocha-framework`\n   - **Jasmine**: `npm install @wdio/jasmine-framework`\n   - **Cucumber**: `npm install @wdio/cucumber-framework`\n   - **Jest**: No adapter needed — see [Jest Framework section](docs/Framework.md#jest)\n\n**Note:** [WebdriverIO](https://github.com/webdriverio/webdriverio) `v10.0.0` or higher is required!\n\n## Usage\n\n### Using WebdriverIO Testrunner\n\nIf you run your tests through the [WDIO testrunner](https://webdriver.io/docs/clioptions), no additional setup is needed. WebdriverIO initializes `expect-webdriverio` and makes `expect` available in the global scope so you can use it directly in your tests:\n\n```js\nawait expect($('#submit')).toBeDisplayed()\nawait expect($$('buttons')).toBeDisplayed()\n```\n\nSee more [Examples](docs/Examples.md).\n\n#### Multi-remote\n\nWith [multi-remote](https://webdriver.io/docs/multiremote), assertions check every browser instance, with a single expected value or one per instance:\n\n```js\nawait expect(multiRemoteBrowser).toHaveTitle('WebdriverIO')\nawait expect(multiRemoteBrowser.$('h1')).toHaveText(expect.multiRemote({ chrome: 'Welcome', firefox: 'Bienvenue' }))\n```\n\n#### Local & Browser Runners\n- **Local Runner**: Fully compatible. You can leverage your test framework adapter as mentioned above.\n- **Browser Runner**: Designed for component frameworks like React, Preact, Vue.js, Svelte, and SolidJS, with a few known limitations. For details, see the [Browser Runner Framework section](docs/Framework.md#browser-runner).\n\n### Using in Standalone Mode\n\nIf you use WebdriverIO in standalone mode (without `@wdio/globals`), make sure you import `expect-webdriverio` before using it anywhere.\n\n```js\nimport { remote } from 'webdriverio'\nimport { expect } from 'expect-webdriverio'\n\n;(async () => {\n    const browser = await remote({\n        capabilities: {\n            browserName: 'chrome'\n        }\n    })\n\n    await browser.url('https://webdriver.io')\n\n    const $button = await browser.$('.DocSearch-Button')\n    await expect($button).toBeDisplayed()\n    \n    await browser.deleteSession()\n})().catch(console.error)\n```\n\n## API\n\nPlease see the [API documentation](docs/API.md).\n\n## Error Messages\n\nError messages are informative out of the box and contain:\n\n- Full element selector, like `$('form')`\n- Actual and expected values\n- Highlighted differences (text assertions)\n\n![toHaveText](/docs/img/errors/text.png?raw=true \"toHaveText\")\n![toHaveElementClass](/docs/img/errors/class.png?raw=true \"toHaveElementClass\")\n\n## What's Next?\n\nFirst of all, **feel free to raise an issue with your suggestions or help with PRs!**\n","publish_time":1750278153816,"_cnpm_publish_time":1750278153816,"dist-tags":{"latest":"8.1.0","legacy-v4":"4.15.4","next":"8.0.0-alpha.3"}}