-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
docs(appium): add an example for getSessions endpoint and add Deprecated for endpoionts which have no vendor key in the path and not in w3c spec #19851
Conversation
`MultiSessionData`<`C`\>[] | ||
|
||
A list of session data objects | ||
A list of session data objects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should mark this endpoint as deprecated and not recommended for use, same as getSession one as they are not part of the W3C spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense. I have added a few deprecated marks by following this file's others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any replacements for those deprecated endpoints? They might be used in the Inspector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No for now I believe.
I think the inspector can be just "attach to a session" and users should give explicit session id. Current attach to an existing session does not let a user set an arbitrary session id by themselves, but it can have such setting an arbitrary session id to "attach to" the session.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be a lot more inconvenient than the current process of automatic session discovery. Maybe this information can be added in the /status
endpoint response, similarly to Selenium Grid? And for GET session/:sessionId
, maybe something like GET /session/:sessionId/appium/info
?
Can't comment on getLog
and getLogTypes
, but those could also just be moved to the corresponding /session/:sessionId/appium/...
endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, we might need to add mobile: getSessions
as current base method to define additional commands not in w3c webdriver spec.
/status
should be ready
and message
https://www.w3.org/TR/webdriver2/#status , so not for this usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, or maybe we could define the /sessions
endpoint in a new plugin? but not in the base driver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mobile: getSessions
sort of implies it isn't compatible with other Appium-supported platforms like Mac. And while having this in a separate plugin is feasible, from a user perspective it would feel quite arbitrary to separate this.
I think /status
could still work here because while it has to include ready
and message
, it "may additionally include arbitrary meta information that is specific to the implementation". Selenium Grid also seems to do this, though I'm not sure if its /status
endpoint is W3C-compliant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then it looks like a new plugin for it would be nice. I don't know that response format by the grid, so we may need to check the response format first.
e.g. selenium-grid-status
plugin for the new /status
format like the grid usage (need to check the format), sessions-plugin
to keep /sessions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#19856 for the plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point I would prefer if the deprecation labels were moved to a separate PR and merged after #19856/#19857/#19858
For the label format in MkDocs, it would also be better to use something like
!!! warning "Deprecated"
Please use the `<endpoint>` endpoint instead
XCUITest driver docs already use this format.
Sure, then this pr can drop deprecated marks from Btw, other Appium clients will drop/dropped these endpoint call (since dependent selenium already dropped them) so maybe the appium-inspector usage is the main discussion focus right now. |
e53453b
to
06ec1cb
Compare
Proposed changes
https://github.com/appium/appium-inspector/pull/1369/files#r1510701460
It looks like we should put an example of the response of
/sessions
since it is not in W3C webdriver spec. This example would help.e.g. https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessions
Types of changes
What types of changes does your code introduce to Appium?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...