Skip to content

docs: add Appium 3 migration guide #21174

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

Merged
merged 13 commits into from
Apr 6, 2025

Conversation

eglitise
Copy link
Collaborator

@eglitise eglitise commented Apr 3, 2025

This PR adds a migration guide from Appium 2 to Appium 3.

The guide covers all the items listed in #20792 (except the Inspector integration, as that is covered under removed endpoints) and provides required actions for each item. Most notably, it also includes a full list of removed endpoints, and one or more suggested replacements (all the ones I could find).

There are still 18 endpoints for which I could not find replacements, but perhaps there is a different related endpoint for each of them?

  • POST /session/:sessionId/appium/app/end_test_coverage
  • GET /session/:sessionId/application_cache/status
  • GET /session/:sessionId/element/:elementId/equals/:otherId
  • GET /session/:sessionId/element/:elementId/location_in_view
  • GET /session/:sessionId/element/:elementId/pageIndex
  • POST /session/:sessionId/element/:elementId/submit - the Selenium docs simply list that the replacement is calling the click action on the form submission button
  • GET/POST/DELETE/ /session/:sessionId/local_storage/* (6 endpoints)
  • GET/POST/DELETE/ /session/:sessionId/session_storage/* (6 endpoints)

@eglitise eglitise mentioned this pull request Apr 2, 2025
20 tasks
@KazuCocoa
Copy link
Member

KazuCocoa commented Apr 3, 2025

POST /session/:sessionId/keys

I thought this was replaced with W3C action's send keys (from JSONWP -> W3C WebDriver protocol thing). https://www.selenium.dev/documentation/webdriver/actions_api/keyboard/#send-keys

@eglitise
Copy link
Collaborator Author

eglitise commented Apr 3, 2025

@KazuCocoa
Copy link
Member

Afaik, others haven't been implemented or have already been removed so long, so our regular drivers don't have them now.

Copy link
Member

@KazuCocoa KazuCocoa left a comment

Choose a reason for hiding this comment

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

lgtm

### Feature Flag Prefix Required

With Appium 2, it was possible to opt into certain [insecure features](http://appium.io/docs/en/latest/guides/security/)
on server startup, which could be enabled using the `--allow-insecure` or `--relaxed-security`
Copy link
Collaborator

Choose a reason for hiding this comment

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

relaxed-security -> deny-insecure

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

deny-insecure would be used with relaxed-security to then opt out of specific features. The context here is specifically about enabling features, so relaxed-security fits

* `mobile: activateApp` :material-android: :material-coffee:
* `macos: launchApp` or `macos: activateApp` :material-apple-finder:
* `windows: launchApp` :material-microsoft-windows:
* `POST /session/:sessionId/appium/app/reset`
Copy link
Collaborator

Choose a reason for hiding this comment

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

this functionality was deprecated a while ago. Generally, an direct alternative to reset was to quit the testing session and then start it again with the same capabilities, so the behavior depended on which capabilities were provided initially. I remember @wswebcreation was working on a WDIO wrapper API that allows to reliably implement app restart on android and ios

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I've read the issue about removing this method, but as far as methods go, these are the closest ones I could find

Copy link
Collaborator

@mykola-mokhnach mykola-mokhnach left a comment

Choose a reason for hiding this comment

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

very nice document. Love it ❤️

@mykola-mokhnach
Copy link
Collaborator

I also haven't added GET /session/:sessionId to the removed endpoints, as it has not been removed yet.

I really don't know what to do with this one. It has too many references. Not sure I have enough capacity to deal with it in the near future 🤷

@eglitise
Copy link
Collaborator Author

eglitise commented Apr 4, 2025

I really don't know what to do with this one. It has too many references. Not sure I have enough capacity to deal with it in the near future 🤷

I suppose it might be fine to keep it for now, and evaluate its removal in the next major version. Quite a few older endpoints are already being removed, anyway.

@eglitise eglitise added the v3 Appium v3 label Apr 5, 2025
@eglitise eglitise merged commit d3a9d61 into appium:appium3 Apr 6, 2025
2 checks passed
@eglitise eglitise deleted the appium3-migration-guide branch April 6, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 Appium v3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants