{"id":20560130,"url":"https://github.com/webdriverio/wdio-wait-for","last_synced_at":"2025-04-14T14:03:09.853Z","repository":{"id":37966728,"uuid":"359545441","full_name":"webdriverio/wdio-wait-for","owner":"webdriverio","description":"a lightweight library of useful expected conditions for the WebdriverIO framework.","archived":false,"fork":false,"pushed_at":"2024-04-08T11:07:17.000Z","size":4402,"stargazers_count":18,"open_issues_count":0,"forks_count":4,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-04-14T07:11:15.623Z","etag":null,"topics":["selenium","typesript","webdriver","webdriverio","webdriverio-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webdriverio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"tidelift":"npm/webdriverio","open_collective":"webdriverio"}},"created_at":"2021-04-19T17:35:57.000Z","updated_at":"2024-02-07T00:15:43.000Z","dependencies_parsed_at":"2024-02-01T03:04:13.436Z","dependency_job_id":"66530c91-7549-4a20-bfaf-4fc30272643b","html_url":"https://github.com/webdriverio/wdio-wait-for","commit_stats":{"total_commits":757,"total_committers":11,"mean_commits":68.81818181818181,"dds":0.142668428005284,"last_synced_commit":"f47a625ad5f601840f9a3050e1de0866f3bfdfd2"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdriverio%2Fwdio-wait-for","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdriverio%2Fwdio-wait-for/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdriverio%2Fwdio-wait-for/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdriverio%2Fwdio-wait-for/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webdriverio","download_url":"https://codeload.github.com/webdriverio/wdio-wait-for/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224443945,"owners_count":17312127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["selenium","typesript","webdriver","webdriverio","webdriverio-plugin"],"created_at":"2024-11-16T03:53:13.852Z","updated_at":"2024-11-16T03:53:15.035Z","avatar_url":"https://github.com/webdriverio.png","language":"TypeScript","funding_links":["https://tidelift.com/funding/github/npm/webdriverio","https://opencollective.com/webdriverio"],"categories":[],"sub_categories":[],"readme":"# WDIO Wait For [![Tests](https://github.com/webdriverio/wdio-wait-for/actions/workflows/main.yaml/badge.svg)](https://github.com/webdriverio/wdio-wait-for/actions/workflows/main.yaml) [![Total npm downloads](https://img.shields.io/npm/dt/wdio-wait-for.svg)](https://www.npmjs.com/package/wdio-wait-for)\n\n\u003e wdio-wait-for is a Node.js library for [WebdriverIO](http://webdriver.io/) that supplies a set of common conditions that provides functionalities to wait for certain conditions till a defined task is complete.\n\n## Installation\nTo use `wdio-wait-for` in your project, run:\n\n```shell\nnpm i -D wdio-wait-for\n```\n\nIf you use Yarn, run:\n\n```sh\nyarn add --dev wdio-wait-for\n```\n\n## [API](./docs/modules.md)\n\n- [alertIsPresent](docs/modules/browser_alertispresent.md)\n- [numberOfWindowsToBe​](docs/modules/browser_numberofwindowstobe_.md)\n- [titleContains](docs/modules/browser_titlecontains.md)\n- [titleIs](docs/modules/browser_titleis.md)\n- [urlContains](docs/modules/browser_urlcontains.md)\n- [urlIs](docs/modules/browser_urlis.md)\n- [elementToBeClickable](docs/modules/element_elementtobeclickable.md)\n- [elementToBeEnabled](docs/modules/element_elementtobeenabled.md)\n- [elementToBeSelected](docs/modules/element_elementtobeselected.md)\n- [invisibilityOf](docs/modules/element_invisibilityof.md)\n- [numberOfElementsToBe](docs/modules/element_numberofelementstobe.md)\n- [numberOfElementsToBeLessThan](docs/modules/element_numberofelementstobelessthan.md)\n- [numberOfElementsToBeMoreThan​](docs/modules/element_numberofelementstobemorethan_.md)\n- [presenceOf](docs/modules/element_presenceof.md)\n- [sizeOfElementToBe](docs/modules/element_sizeofelementtobe.md)\n- [stalenessOf](docs/modules/element_stalenessof.md)\n- [textToBePresentInElement](docs/modules/element_texttobepresentinelement.md)\n- [textToBePresentInElementValue](docs/modules/element_texttobepresentinelementvalue.md)\n- [visibilityOf](docs/modules/element_visibilityof.md)\n- [and](docs/modules/logical_and.md)\n- [not](docs/modules/logical_not.md)\n- [or](docs/modules/logical_or.md)\n\n## Examples\n\n### Import\n#### CommonJS\n\nIf you are using WebdriverIO v7 and lower with [CommonJS](https://en.wikipedia.org/wiki/CommonJS) you have to use `require` to import the package, e.g.:\n\n```javascript\n// import all methods\nconst EC = require('wdio-wait-for');\n\nbrowser.waitUntil(EC.alertIsPresent(), { timeout: 5000, timeoutMsg: 'Failed, after waiting for the alert to be present' })\n```\n\n```javascript\n// import specific method\nconst { alertIsPresent } = require('wdio-wait-for');\n\nbrowser.waitUntil(alertIsPresent(), { timeout: 5000, timeoutMsg: 'Failed, after waiting for the alert to be present' })\n```\n\n#### ESM\n\nWith TypeScript or WebdriverIO v8 and upwards you can use the `import` statement to import either all helper methods, e.g.:\n\n```typescript\n// import all methods\nimport * as EC from 'wdio-wait-for';\n\nbrowser.waitUntil(EC.elementToBeEnabled('input'), { timeout: 5000, timeoutMsg: 'Failed, after waiting for the element to be enabled' })\n```\n\nor just specific ones, e.g.:\n\n```typescript\n// import specific method\nimport { elementToBeEnabled } from 'wdio-wait-for';\n\nbrowser.waitUntil(elementToBeEnabled('input'), { timeout: 5000, timeoutMsg: 'Failed, after waiting for the element to be enabled' })\n```\n\n### Wait for alert\nThis code code snippet shows how to use conditions\n\n```typescript\nbrowser.waitUntil(alertIsPresent(), { timeout: 5000, timeoutMsg: 'Failed, after waiting for the alert to be present' })\n```\n\n### Wait for Elements\n\nThis code code snippet shows how to use conditions to wait e.g. on a certain number of elements to exist:\n\n```typescript\nbrowser.waitUntil(numberOfElementsToBe('.links', 2), { timeout: 5000, timeoutMsg: 'Failed, after waiting for the 2 elements' })\n```\n\n## License\n\n[MIT licensed](./LICENSE).\n\n## Author\n\nYevhen Laichenkov - `elaichenkov@gmail.com`\u003cbr /\u003e\nChristian Bromann - `mail@bromann.dev`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdriverio%2Fwdio-wait-for","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebdriverio%2Fwdio-wait-for","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdriverio%2Fwdio-wait-for/lists"}