{"name":"expect-webdriverio","version":"5.6.5","keywords":["expect-webdriverio","expect","webdriverio","wdio"],"author":{"name":"Mykola Grybyk","email":"mykola.grybyk@gmail.com"},"license":"MIT","_id":"expect-webdriverio@5.6.5","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":"b4cc5b4fc00402040d5a6f5298c97541f7f547e7","tarball":"http://registry-npm.ywwl.com/expect-webdriverio/download/expect-webdriverio-5.6.5.tgz","fileCount":55,"integrity":"sha512-5ot+Apo0bEvMD/nqzWymQpgyWnOdu0kVpmahLx5T7NzUc6RyifucZ24Gsfr6F6C8yRGBhmoFh7ZeY+W9kteEBQ==","signatures":[{"sig":"MEUCICZ+kAQz5c+x1S50anvwWoO7fTccZyejaphK31GcFtTcAiEAhQTvofl/GU8hFt0HkI/MP1P/lEV4t9p31W1A0b6Ki94=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/expect-webdriverio@5.6.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":124617,"size":24739,"noattachment":false,"key":"/expect-webdriverio/-/expect-webdriverio-5.6.5.tgz"},"type":"module","types":"./types/expect-webdriverio.d.ts","module":"./lib/index.js","engines":{"node":">=20"},"exports":{".":[{"types":"./types/expect-webdriverio.d.ts","import":"./lib/index.js"},"./lib/index.js"],"./jest":[{"types":"./jest.d.ts"}],"./types":"./types/expect-global.d.ts","./jasmine":[{"types":"./jasmine.d.ts"}],"./expect-global":"./types/expect-global.d.ts","./jasmine-wdio-expect-async":[{"types":"./jasmine-wdio-expect-async.d.ts"}]},"gitHead":"a7b0aa6e1862a5965822a80e1b3431eadbdbf13b","scripts":{"ts":"run-s ts:* 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","test:tsc":"tsc --project tsconfig.json --noEmit --rootDir .","ts:mocha":"cd test-types/mocha && tsc --project ./tsconfig.json","test:lint":"eslint .","test:unit":"vitest --run","checks:all":"npm run build && npm run compile && npm run tsc:root-types && npm run test && npm run ts","test:types":"npm run ts && npm run tsc:root-types","ts:jasmine":"cd test-types/jasmine && tsc --project ./tsconfig.json","clean:build":"rimraf ./lib","tsc:root-types":"node types-checks-filter-out-node_modules.js","ts:jasmine-async":"cd test-types/jasmine-async && tsc --project ./tsconfig.json","playgrounds:setup":"for dir in playgrounds/*/; do cd \"$dir\" && npm install && cd ../..; done","ts:jest:@types-jest":"cd test-types/jest-@types_jest && tsc --project ./tsconfig.json","ts:jest:@jest/global":"cd test-types/jest-@jest_global && tsc --project ./tsconfig.json","playgrounds:checks:all":"for dir in playgrounds/*/; do cd \"$dir\" && npm run checks:all && cd ../..; done","playgrounds:snapshots:update":"cd playgrounds/mocha && npm run snapshots:update && cd ../jest && npm run snapshots:update && cd ../.."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:82ab31a5-dbd7-40b1-9d59-20a8fcf9c008"}},"repository":{"url":"git+https://github.com/webdriverio/expect-webdriverio.git","type":"git"},"_npmVersion":"11.9.0","description":"WebdriverIO Assertion Library","directories":{},"_nodeVersion":"24.14.0","dependencies":{"expect":"^30.2.0","deep-eql":"^5.0.2","@vitest/snapshot":"^4.0.16","jest-matcher-utils":"^30.2.0"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","eslint":"^9.39.2","rimraf":"^6.1.2","vitest":"^4.0.16","shelljs":"^0.10.0","release-it":"^19.1.0","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.1","@wdio/types":"^9.20.0","webdriverio":"^9.21.0","@types/debug":"^4.1.12","@types/mocha":"^10.0.10","@wdio/eslint":"^0.1.2","npm-run-all2":"^8.0.4","@jest/globals":"^30.2.0","@types/jasmine":"^5.1.8","@vitest/coverage-v8":"^4.0.16"},"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.6.5_1773430491202_0.36566189354985545","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":1773430491396,"_cnpm_publish_time":1773430491396,"dist-tags":{"latest":"8.1.0","legacy-v4":"4.15.4","next":"8.0.0-alpha.3"}}