Skip to content

Feat/add scroll commands android #4404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Feat/add scroll commands android #4404

wants to merge 3 commits into from

Conversation

rezaansari7
Copy link

Add Scroll Commands for Web and Android Native Apps

This PR adds TypeScript type definitions for scroll commands to support both web and Android native app automation.

Changes

  • Added ScrollOptions and ScrollToOptions interfaces for web scroll commands
  • Added AndroidScrollOptions interface for Android native app scroll commands
  • Added the following methods to NightwatchBrowser interface:
    • Web scroll commands:
      • scrollTo: Scrolls to specific coordinates
      • scrollIntoView: Scrolls an element into view
      • scrollToBottom: Scrolls to the bottom of the document
      • scrollToTop: Scrolls to the top of the document
    • Android native app scroll commands:
      • androidScroll: Scrolls in specified direction
      • androidScrollToElement: Scrolls to specific elements

Testing

  • Added comprehensive JSDoc comments for better documentation
  • Type definitions follow existing patterns in the codebase
  • All changes are backward compatible

@rezaansari7 rezaansari7 deleted the feat/add-scroll-commands-android branch April 27, 2025 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant