Skip to content
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

feat: Add support of executeMethodMap #863

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

mykola-mokhnach
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach commented Jan 31, 2025

BREAKING CHANGE: The following methods and properties were removed:

  • mobileSetClipboard -> replaced by setClipboard
  • mobileGetClipboard -> replaced by getClipboard
  • executeMobile -> replaced by execute (the script argument must also be changed to start with mobile: )
  • mobileCommandsMapping -> replaced by executeMethodsMap
  • mobileGetAppStrings -> replaced by getStrings

BREAKING CHANGE: The following methods were changed:

  • mobileDragGesture
  • mobileFlingGesture
  • mobileDoubleClickGesture
  • mobileClickGesture
  • mobilePinchOpenGesture
  • mobilePinchCloseGesture
  • mobileSwipeGesture
  • mobileScrollGesture
  • mobileScrollBackTo
  • mobileScroll
  • mobileDeepLink
  • mobileAcceptAlert
  • mobileDismissAlert
  • mobileType
  • mobileReplaceElementValue
  • mobileInstallMultipleApks
  • mobileBackgroundApp
  • mobilePressKey
  • mobileScreenshots
  • mobileScheduleAction
  • mobileUnscheduleAction
  • mobileGetActionHistory

BREAKING CHANGE: The following obsolete type definitions were removed:

  • DragOptions
  • FlingOptions
  • ClickOptions
  • LongClickOptions
  • PinchOptions
  • SwipeOptions
  • ScrollGestureOptions
  • ScrollElementToElementOpts
  • ScrollOptions
  • DeepLinkOpts
  • AcceptAlertOptions
  • DismissAlertOptions
  • TypingOptions
  • ReplaceValueOptions
  • InstallMultipleApksOptions
  • BackgroundAppOptions
  • PressKeyOptions
  • ScreenshotsOpts
  • ActionArgs
  • SetClipboardOpts
  • GetAppStringsOptions

Based on appium/appium-android-driver#982

@eglitise
Copy link
Contributor

I was about to mention that the README should be updated as well, but none of these methods are actually described there 🤔 Still, I think it's worth at least editing the PR description to highlight replacements:

  • mobileSetClipboard -> mobile: setClipboard
  • mobileGetClipboard -> mobile: getClipboard
  • executeMobile -> execute (the argument must also be changed to start with mobile:)
  • mobileCommandsMapping -> will be re-added in the future

mobileGetAppStrings has been removed too, with mobile: getAppStrings being the replacement.

@mykola-mokhnach
Copy link
Contributor Author

mykola-mokhnach commented Jan 31, 2025

I was about to mention that the README should be updated as well, but none of these methods are actually described there 🤔 Still, I think it's worth at least editing the PR description to highlight replacements:

  • mobileSetClipboard -> mobile: setClipboard
  • mobileGetClipboard -> mobile: getClipboard
  • executeMobile -> execute (the argument must also be changed to start with mobile:)
  • mobileCommandsMapping -> will be re-added in the future

mobileGetAppStrings has been removed too, with mobile: getAppStrings being the replacement.

These are changes that might be important for people who work with driver directly or via inheritance. For the wast majority of end users (Appium users) they should be transparent. All existing execute methods must remain stable

@eglitise
Copy link
Contributor

It is entirely plausible that there are users relying on driver.mobileSetClipboard or any of the other removed methods. That's why I think it's important to mention their suggested replacements.

@mykola-mokhnach
Copy link
Contributor Author

It is entirely plausible that there are users relying on driver.mobileSetClipboard or any of the other removed methods. That's why I think it's important to mention their suggested replacements.

added

@eglitise
Copy link
Contributor

eglitise commented Feb 1, 2025

👍
mobileGetAppStrings -> getStrings should also be added in the removal section

@mykola-mokhnach
Copy link
Contributor Author

👍 mobileGetAppStrings -> getStrings should also be added in the removal section

added

@mykola-mokhnach mykola-mokhnach merged commit 4c45c3a into appium:master Feb 1, 2025
9 checks passed
@mykola-mokhnach mykola-mokhnach deleted the a_driver_up branch February 1, 2025 14:41
github-actions bot pushed a commit that referenced this pull request Feb 1, 2025
## [4.0.0](v3.10.0...v4.0.0) (2025-02-01)

### ⚠ BREAKING CHANGES

* The following methods and properties were **removed**:
- mobileSetClipboard -> replaced by setClipboard
- mobileGetClipboard -> replaced by getClipboard
- executeMobile -> replaced by execute (the` script` argument must also be changed to start with `mobile: `)
- mobileCommandsMapping -> replaced by executeMethodsMap
- mobileGetAppStrings -> replaced by getStrings
* The following methods were **changed**:
- mobileDragGesture
- mobileFlingGesture
- mobileDoubleClickGesture
- mobileClickGesture
- mobilePinchOpenGesture
- mobilePinchCloseGesture
- mobileSwipeGesture
- mobileScrollGesture
- mobileScrollBackTo
- mobileScroll
- mobileDeepLink
- mobileAcceptAlert
- mobileDismissAlert
- mobileType
- mobileReplaceElementValue
- mobileInstallMultipleApks
- mobileBackgroundApp
- mobilePressKey
- mobileScreenshots
- mobileScheduleAction
- mobileUnscheduleAction
- mobileGetActionHistory
* The following obsolete type definitions were **removed**:
- DragOptions
- FlingOptions
- ClickOptions
- LongClickOptions
- PinchOptions
- SwipeOptions
- ScrollGestureOptions
- ScrollElementToElementOpts
- ScrollOptions
- DeepLinkOpts
- AcceptAlertOptions
- DismissAlertOptions
- TypingOptions
- ReplaceValueOptions
- InstallMultipleApksOptions
- BackgroundAppOptions
- PressKeyOptions
- ScreenshotsOpts
- ActionArgs
- SetClipboardOpts
- GetAppStringsOptions

Based on appium/appium-android-driver#982

### Features

* Add support of executeMethodMap ([#863](#863)) ([4c45c3a](4c45c3a))
Copy link

github-actions bot commented Feb 1, 2025

🎉 This PR is included in version 4.0.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