{"name":"expect-webdriverio","version":"7.0.0","keywords":["expect-webdriverio","expect","webdriverio","wdio"],"author":{"name":"Mykola Grybyk","email":"mykola.grybyk@gmail.com"},"license":"MIT","_id":"expect-webdriverio@7.0.0","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":"1565fb11248237bb71e7af476f27b1cc7dbb8cec","tarball":"http://registry-npm.ywwl.com/expect-webdriverio/download/expect-webdriverio-7.0.0.tgz","fileCount":67,"integrity":"sha512-Clrnhgba0q1VaOOylWXMKEqABkAIVF2MhYKvz1KWlRgtW3FDWQv06aguwmKtotZg/YjidtxVEpsoqLHQyeyR1g==","signatures":[{"sig":"MEQCIAuudWgHwjUYcgNABXUur/yrJ4CumKnENMLoSofooeovAiA7fN0ca337GEgVLVL4CbZUxMifsAknnZCRhRR1rPTemg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIG0IGv7XopCv4AKVQQjwhiGCFqDJMhqorf+hRsn+fM3VAiEAi4b4r3wYc/cEgN5JTCL/QNmm3Y1ftC12huDLVBzWwSE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/expect-webdriverio@7.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":238502,"size":44091,"noattachment":false,"key":"/expect-webdriverio/-/expect-webdriverio-7.0.0.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"],"./api":[{"types":"./types/expect-webdriverio.d.ts","import":"./lib/api/index.js"},"./lib/api/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":"27f621951126a1b71389865d00d73785e62e34f7","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":"run-s compile:*","prepare":"husky","test:tsc":"tsc --project tsconfig.json --noEmit --rootDir .","ts:mocha":"cd test-types/mocha && vitest --typecheck --typecheck.tsconfig ./tsconfig.json --run","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 && vitest --typecheck --typecheck.tsconfig ./tsconfig.json --run","clean:build":"rimraf ./lib","compile:lib":"tsc --build tsconfig.build.json","compile:check":"if [ ! -f lib/index.js ] || [ $(find lib -type f | wc -l) -le 30 ]; then echo 'File structure under lib is broken'; exit 1; fi","tsc:root-types":"node types-checks-filter-out-node_modules.js","playgrounds:clean":"rimraf --glob '**/node_modules'","playgrounds:setup":"npm run playgrounds:clean; npm i && cd playgrounds && npm run setup","ts:arethetypeswrong":"npx @arethetypeswrong/cli --pack . --profile esm-only","ts:jest:@types-jest":"cd test-types/jest-@types_jest && vitest --typecheck --typecheck.tsconfig ./tsconfig.json --run","playgrounds:checks:all":"cd playgrounds && npm run checks:all","playgrounds:snapshots:update":"cd playgrounds && npm run snapshots:update","ts:jasmine-global-expect-async":"cd test-types/jasmine-global-expect-async && vitest --typecheck --typecheck.tsconfig ./tsconfig.json --run"},"_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.19.0","description":"WebdriverIO Assertion Library","directories":{},"_nodeVersion":"24.21.0","dependencies":{"expect":"^30.4.1","deep-eql":"^5.0.2","@vitest/snapshot":"^4.1.11","jest-matcher-utils":"^30.4.1"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","eslint":"^9.39.5","rimraf":"^6.1.3","vitest":"^4.1.11","release-it":"^21.0.2","strip-ansi":"^7.2.0","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.13.3","@wdio/types":"^9.32.0","webdriverio":"^9.32.0","@types/debug":"^4.1.13","@types/mocha":"^10.0.10","@wdio/eslint":"^0.1.3","npm-run-all2":"^9.0.3","@jest/globals":"^30.4.1","@types/jasmine":"^5.1.15","@vitest/coverage-v8":"^4.1.11","@arethetypeswrong/cli":"^0.18.5","@vitest/eslint-plugin":"^1.6.27"},"peerDependencies":{"webdriverio":"^9.31.5","@wdio/logger":"^9.0.0","@wdio/globals":"^9.23.0"},"typeScriptVersion":"3.8.3","peerDependenciesMeta":{"webdriverio":{"optional":false},"@wdio/logger":{"optional":false},"@wdio/globals":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/expect-webdriverio_7.0.0_1790536933549_0.9338894496575771","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":1790536933634,"_cnpm_publish_time":1790536933634,"dist-tags":{"latest":"8.1.0","legacy-v4":"4.15.4","next":"8.0.0-alpha.3"}}