{"id":13752726,"url":"https://github.com/AppiumTestDistribution/appium-gestures-plugin","last_synced_at":"2025-05-09T20:34:13.821Z","repository":{"id":42616947,"uuid":"372508957","full_name":"AppiumTestDistribution/appium-gestures-plugin","owner":"AppiumTestDistribution","description":"Appium plugin designed to perform gestures using W3C Actions.","archived":false,"fork":false,"pushed_at":"2025-05-01T17:18:15.000Z","size":791,"stargazers_count":59,"open_issues_count":13,"forks_count":13,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-03T16:09:11.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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}},"created_at":"2021-05-31T13:03:56.000Z","updated_at":"2025-04-25T20:42:12.000Z","dependencies_parsed_at":"2024-01-31T16:35:10.785Z","dependency_job_id":"bfe3d8d1-90ec-4691-a49a-e84c90033122","html_url":"https://github.com/AppiumTestDistribution/appium-gestures-plugin","commit_stats":{"total_commits":57,"total_committers":3,"mean_commits":19.0,"dds":"0.42105263157894735","last_synced_commit":"4564ac49332816aeaf0b35a7f39226e47e8802e6"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppiumTestDistribution%2Fappium-gestures-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppiumTestDistribution%2Fappium-gestures-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppiumTestDistribution%2Fappium-gestures-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppiumTestDistribution%2Fappium-gestures-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppiumTestDistribution","download_url":"https://codeload.github.com/AppiumTestDistribution/appium-gestures-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253321733,"owners_count":21890453,"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":[],"created_at":"2024-08-03T09:01:10.061Z","updated_at":"2025-05-09T20:34:11.886Z","avatar_url":"https://github.com/AppiumTestDistribution.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003e\n\t\u003cbr\u003e\n\t\u003cimg src=\"assets/GesturesPlugin.jpg\" alt=\"AppiumGestures\"\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\u003c/h1\u003e\n\n# appium-gestures-plugin [![npm version](https://badge.fury.io/js/appium-gestures-plugin.svg)](https://badge.fury.io/js/appium-gestures-plugin)\n\nThis is an Appium plugin designed to perform basic gestures using W3C Actions.\n\n## Prerequisite\n\nAppium version 2.0\n\n## Installation - Server\n\nInstall the plugin using Appium's plugin CLI, either as a named plugin or via NPM:\n\n```shell\nappium plugin install --source=npm appium-gestures-plugin\n```\n\n## Activation\n\nThe plugin will not be active unless turned on when invoking the Appium server:\n\n```shell\nappium --use-plugins=gestures\n```\n\n# Usage\n\nSample app used to demonstrate below gesture is available [here](https://github.com/webdriverio/native-demo-app/releases)\n\n# Swipe Left\n\n```java\nRemoteWebElement carousel = (RemoteWebElement) wait.until(presenceOfElementLocated(AppiumBy.accessibilityId(\"Carousel\")));\n\ndriver.executeScript(\"gesture: swipe\", Map.of(\"elementId\", carousel.getId(), \"percentage\", 50, \"direction\", \"left\"));\n```\n\n# Swipe Right\n\n```java\nRemoteWebElement carousel = (RemoteWebElement) wait.until(presenceOfElementLocated(AppiumBy.accessibilityId(\"Carousel\")));\n\ndriver.executeScript(\"gesture: swipe\", Map.of(\"elementId\", carousel.getId(), \"percentage\", 50, \"direction\", \"right\"));\n```\n\n# Swipe Up\n\n```java\nRemoteWebElement scrollView = (RemoteWebElement) wait.until(presenceOfElementLocated(AppiumBy.accessibilityId(\"Swipe-screen\")));\n\ndriver.executeScript(\"gesture: swipe\", Map.of(\"elementId\", scrollView.getId(),\n                \"percentage\", 50,\n                \"direction\", \"up\"));\n```\n\n# Swipe Down\n\n```java\nRemoteWebElement scrollView = (RemoteWebElement) wait.until(presenceOfElementLocated(AppiumBy.accessibilityId(\"Swipe-screen\")));\n\ndriver.executeScript(\"gesture: swipe\", Map.of(\"elementId\", scrollView.getId(),\n                \"percentage\", 50,\n                \"direction\", \"down\"));\n```\n\n# scrollElementIntoView\n\n**JAVA**\n```java\nRemoteWebElement scrollView = (RemoteWebElement) wait.until(presenceOfElementLocated(AppiumBy.accessibilityId(\"Swipe-screen\")));\n\ndriver.executeScript(\"gesture: scrollElementIntoView\", Map.of(\"scrollableView\", scrollView.getId(),\n    \"strategy\", \"accessibility id\",\n    \"selector\", \"WebdriverIO logo\",\n    \"percentage\", 50,\n    \"direction\", \"up\",\n    \"maxCount\", 3));\n\n```\n**PYTHON**\n```python\nlist_view = driver.find_element(by=AppiumBy.ID, value='android:id/list')\ndriver.execute_script('gesture: scrollElementIntoView',\n                      {'scrollableView': list_view.id, 'strategy': 'accessibility id', 'selector': 'Picker',\n                       'percentage': 50, 'direction': 'up', 'maxCount': 3})\n```\n\nSample app used to demonstrate below gesture is available [here](https://github.com/AppiumTestDistribution/appium-demo/blob/main/VodQA.apk)\n\n# Drag and Drop\n\n**JAVA**\n```java\nRemoteWebElement source = (RemoteWebElement) wait.until(elementToBeClickable(AppiumBy.accessibilityId(\"dragMe\")));\nRemoteWebElement destination = (RemoteWebElement) wait.until(elementToBeClickable(AppiumBy.accessibilityId(\"dropzone\")));\n\ndriver.executeScript(\"gesture: dragAndDrop\", Map.of(\"sourceId\", source.getId(), \"destinationId\", destination.getId()));\n```\n**PYTHON**\n```python\nel1 = driver.find_element(by=AppiumBy.ID, value='io.appium.android.apis:id/drag_dot_1')\nel2 = driver.find_element(by=AppiumBy.ID, value='io.appium.android.apis:id/drag_dot_2')\n\ndriver.execute_script('gesture: dragAndDrop', {\n    'sourceId': el1.id,\n    'destinationId': el2.id,\n})\n```\n\n# Double Tap\n\n```java\nRemoteWebElement doubleTapMe = (RemoteWebElement) driver.findElement(AppiumBy.accessibilityId(\"doubleTapMe\"));\n\ndriver.executeScript(\"gesture: doubleTap\", Map.of(\"elementId\", doubleTapMe.getId()));\n```\n\n# Long Press\n\nPressure has to be between 0 and 1.\n\n```java\nRemoteWebElement longPress = (RemoteWebElement) driver.findElement(AppiumBy.accessibilityId(\"longpress\"));\n\ndriver.executeScript(\"gesture: longPress\", Map.of(\"elementId\", longPress.getId(), \"pressure\", 0.5, \"duration\", 800));\n\n```\n\n# WDIO\n\n```js\nawait driver.execute('gesture: dragAndDrop', { sourceId, destinationId });\n```\n\n## Supported\n\n- Swipe Left, right, up and down\n- scrollElementIntoView\n- Drag and Drop\n- Double Tap\n- Long Press\n\n### TODO\n\n- zoom\n- multi finger swipe\n","funding_links":[],"categories":["Don't forget to give a :star: to make the project popular"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAppiumTestDistribution%2Fappium-gestures-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAppiumTestDistribution%2Fappium-gestures-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAppiumTestDistribution%2Fappium-gestures-plugin/lists"}