Skip to content

Conversation

@Mochxd
Copy link
Contributor

@Mochxd Mochxd commented Nov 25, 2025

Adding a new "appium_swipe" tool for performing swipe gestures on mobile devices.
Features:

  • support direction-based swipes (left, right, up, down) with automatic screen-size-based coordinate calculation
  • support custom coordinate-based swipes with configurable duration (default 600ms, max 5000ms) for precise gesture control
  • optimized horizontal swipe handling for Android RecyclerViews with improved gesture recognition and timing
  • platform-specific implementations leveraging native mobile commands (mobile: swipe, mobile: dragFromToForDuration) for iOS and W3C Actions API for Android
  • updated documentation in README and tools README with tool usage examples

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 25, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Mochxd / name: Mohamed Mostafa (9af0f68)

const platform = getPlatformName(driver);
let startX: number, startY: number, endX: number, endY: number;

if (args.direction) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mochxd firstly thanks for contribution. I would prefer to have swipe tool based on element rather than only on the basis of screen size. Can you enhance to support both ways?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SrinivasanTarget Thank you for the feedback and the kind words, I’ve updated the implementation to support element based swipes in addition to screen based swipes, had to do a little git time travel with a force-push to keep the history clean. Promise I used my powers responsibly. 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SrinivasanTarget hello Any update for the review?

@Mochxd Mochxd force-pushed the feat/navigation-add-swipe-tool branch from 22587a8 to 292fd5f Compare November 26, 2025 12:59
- Support direction-based swipes (left, right, up, down)
- Support custom coordinate-based swipes with configurable duration
- Optimized horizontal swipe handling for Android RecyclerViews
- Platform-specific implementations for Android and iOS
- Updated documentation in README and tools README
@Mochxd Mochxd force-pushed the feat/navigation-add-swipe-tool branch from 292fd5f to 9af0f68 Compare November 26, 2025 13:01
@SrinivasanTarget SrinivasanTarget merged commit 5c163b7 into appium:main Dec 1, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Dec 1, 2025
## [1.2.0](v1.1.17...v1.2.0) (2025-12-01)

### Features

* **navigation:** add swipe tool for horizontal and vertical swiping ([#49](#49)) ([5c163b7](5c163b7))
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants