{"id":18258393,"url":"https://github.com/appiumtestdistribution/appium-wait-plugin","last_synced_at":"2025-04-04T18:31:48.181Z","repository":{"id":38420586,"uuid":"345078144","full_name":"AppiumTestDistribution/appium-wait-plugin","owner":"AppiumTestDistribution","description":"Plugin to automatically manage all element waits and enables to write wait-free appium tests.","archived":false,"fork":false,"pushed_at":"2024-01-31T01:28:04.000Z","size":28943,"stargazers_count":64,"open_issues_count":17,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-31T21:01:38.150Z","etag":null,"topics":["appium","appium-android","appium-ios","appium-plugin","mobile","mobile-first"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/AppiumTestDistribution.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2021-03-06T11:35:01.000Z","updated_at":"2025-03-18T13:28:25.000Z","dependencies_parsed_at":"2024-01-26T08:27:05.131Z","dependency_job_id":"1a03dfb7-3b94-415d-a9e6-1a3c31610950","html_url":"https://github.com/AppiumTestDistribution/appium-wait-plugin","commit_stats":null,"previous_names":["saikrishna321/appium-wait-plugin"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppiumTestDistribution%2Fappium-wait-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppiumTestDistribution%2Fappium-wait-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppiumTestDistribution%2Fappium-wait-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppiumTestDistribution%2Fappium-wait-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppiumTestDistribution","download_url":"https://codeload.github.com/AppiumTestDistribution/appium-wait-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247229503,"owners_count":20905063,"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":["appium","appium-android","appium-ios","appium-plugin","mobile","mobile-first"],"created_at":"2024-11-05T10:30:48.282Z","updated_at":"2025-04-04T18:31:43.484Z","avatar_url":"https://github.com/AppiumTestDistribution.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# appium-wait-plugin [![npm version](https://badge.fury.io/js/appium-wait-plugin.svg)](https://badge.fury.io/js/appium-wait-plugin)\n\n\u003ch1 align=\"center\"\u003e\n\t\u003cbr\u003e\n\t\u003cimg src=\"images/AppiumWait2.gif\" alt=\"AppiumWait2\"\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\u003c/h1\u003e\nThis is an Appium plugin designed to wait for element to be present.\n\n## Prerequisite\n\nAppium version 2.0\n\nTested with appium v2.0.0-beta.42\n\n### From Verion 2.0.0 \n* Following bindings are not supported \n        - `sessionId/waitplugin/timeout`\n        - `sessionId/waitplugin/getTimeout`\n* Following command are renamed \n        - `plugin: getWaitTimeout` is renamed to `plugin: getWaitPluginProperties`\n        - `plugin: getWaitTimeout` is renamed to `plugin: setWaitPluginProperties`\n\n\n## Installation - Server\n\nInstall the plugin using Appium's plugin CLI, either as a named plugin or via NPM:\n\n```\nappium plugin install --source=npm appium-wait-plugin\n```\n\n## Installation - Client\n\nNo special action is needed to make things work on the client side.\n\n## Activation\n\nThe plugin will not be active unless turned on when invoking the Appium server:\n\n```\nappium --use-plugins=element-wait\n```\n\n## Configuration\n\nTo override the default element-wait retry\n1. Use appium server CLI\n\t--plugin-element-wait-timeout=30000\n\t--plugin-element-wait-interval-between-attempts=200 \n\t--plugin-element-wait-exclude-enabled-check=\"click,clear\"\n\t\n\n2. Use appium server config file. [Refer](https://github.com/AppiumTestDistribution/appium-wait-plugin/blob/main/server-config.json). \n### Example\n\n\nBefore wait-plugin \n\n```\nwait = new WebDriverWait(driver, 30);\nwait.until(presenceOfElementLocated(MobileBy.AccessibilityId(\"login\"))).click();\nwait.until(presenceOfElementLocated(MobileBy.AccessibilityId(\"slider1\")));\ndriver.findElementByAccessibilityId(\"slider1\").click();\nWebElement slider = wait.until(presenceOfElementLocated(MobileBy.AccessibilityId(\"slider\")));\nWebElement slider1 = wait.until(presenceOfElementLocated(MobileBy.AccessibilityId(\"slider1\")));\n```\n\n\nAfter wait-plugin \n\n```\ndriver.findElementByAccessibilityId(\"login\").click();\ndriver.findElementByAccessibilityId(\"slider1\").click();\ndriver.findElementByAccessibilityId(\"login\").sendKeys('Hello');\n```\n## Configure Wait timeout in test\n\nWhile overriding timeouts one can choose to override all or one of the below\n* timeout\n* intervalBetweenAttempts\n\nWDIO Example \n\n```\nawait driver.executeScript('plugin: setWaitPluginProperties', [\n        {\n          timeout: 1111,\n          intervalBetweenAttempts: 11,\n        },\n]);\n\nawait driver.executeScript('plugin: getWaitPluginProperties', [])\n```\nor \n```\nawait driver.executeScript('plugin: setWaitPluginProperties', [\n        {\n          timeout: 1111,\n        },\n]);\n\nawait driver.executeScript('plugin: getWaitPluginProperties', [])\n```\n\nJava Example \n\n```\ndriver.executeScript(\"plugin: setWaitPluginProperties\", ImmutableMap.of(\"timeout\", 1111 , \"intervalBetweenAttempts\", 11 ));\n```\n\nServer logs will be as below:\n\n```\n[Appium] Plugins which can handle cmd 'findElement': element-wait (sessionless)\n[Appium] Plugin element-wait (sessionless) is now handling cmd 'findElement'\n[Plugin [element-wait (sessionless)]] Waiting to find element with accessibility id strategy for login selector\n[Plugin [element-wait (sessionless)]] Waiting to find element with accessibility id strategy for login selector\n[Plugin [element-wait (sessionless)]] Waiting to find element with accessibility id strategy for login selector\n[Plugin [element-wait (sessionless)]] Waiting to find element with accessibility id strategy for login selector\n[Plugin [element-wait (sessionless)]] Element with accessibility id strategy for login selector found.\n[Plugin [element-wait (sessionless)]] Checking if login element is displayed\n[Plugin [element-wait (sessionless)]] login element is displayed.\n```\n\n## Skip element Enabled Check for commands\nBefore performing actions such as `click`, `setValue`, `clear` etc, plugin waits for element to be enabled.\nAs mentioned in [#78](https://github.com/AppiumTestDistribution/appium-wait-plugin/issues/78) if there is a need to skip the `elementEnabled` check for a set of commands, `excludeEnabledCheck` can be sent along with timeout values. \n##### Usage\nwdio\n```\nawait driver.executeScript('plugin: setWaitPluginProperties', [\n        {\n          timeout: 1111,\n          intervalBetweenAttempts: 11,\n\t  excludeEnabledCheck: ['click','setValue']\n        },\n]);\n\nawait driver.executeScript('plugin: getWaitPluginProperties', [])\n```\n\nBy default `excludeEnabledCheck` is empty list.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappiumtestdistribution%2Fappium-wait-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappiumtestdistribution%2Fappium-wait-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappiumtestdistribution%2Fappium-wait-plugin/lists"}