Skip to content

feat(base-driver): Remove deprecated routes #21134

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 9 commits into from
Mar 24, 2025

Conversation

mykola-mokhnach
Copy link
Collaborator

No description provided.

GET: {command: 'getSession', deprecated: true},
// Even though this command is not present in the official W3C protocol
// we find it useful and keep it for good in Appium
GET: {command: 'getSession'},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this replaced by GET /session/:sessionId/appium/capabilities?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there are too many things, especially in tests, depending on this endpoint
perhaps it would be a good idea to do something about it in the other PR

Copy link
Collaborator

Choose a reason for hiding this comment

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

Alright, if we want to handle it in a separate PR, that sounds reasonable.

@@ -123,9 +123,9 @@ describe('AppiumDriver', function () {
mockFakeDriver
.expects('createSession')
.once()
.withExactArgs(undefined, null, W3C_CAPS, [])
.withExactArgs(W3C_CAPS, W3C_CAPS, W3C_CAPS, [])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to keep the same argument count? If we're making a breaking change, might as well remove the now-duplicate arguments.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is something I don't really want to break as it would require to update all drivers.
Historically we were sending w3c caps as the third argument, where the first and the second were reserved for jwp caps.

I've updated the logic so now w3c caps are passed to all three, which still makes it backward compatible with other createSession signatures as we pick these arguments in priority: 3 ?? 2 ?? 1

Would you still prefer to rather break the stuff?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We would have to update all drivers regardless, due to the minimum Node version bump. But I'm fine if we decide to keep this for now, and change it in the next major release.

Copy link
Member

Choose a reason for hiding this comment

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

yeah I think we should probably make this breaking change for v3. It's been super annoying and we're already making breaking changes so...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't mind. It should be done in a separate PR though, this one is already quite large

@mykola-mokhnach mykola-mokhnach marked this pull request as ready for review March 22, 2025 13:48
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.

lg

@mykola-mokhnach mykola-mokhnach merged commit 4716f40 into appium:appium3 Mar 24, 2025
6 checks passed
@mykola-mokhnach mykola-mokhnach deleted the depecated_1 branch March 24, 2025 07:07
@eglitise eglitise mentioned this pull request Mar 17, 2025
20 tasks
@eglitise eglitise added the v3 Appium v3 label Apr 5, 2025
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.

4 participants