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

Implement Release Actions endpoint #755

Open
4 tasks
OndraM opened this issue Feb 10, 2020 · 2 comments
Open
4 tasks

Implement Release Actions endpoint #755

OndraM opened this issue Feb 10, 2020 · 2 comments
Milestone

Comments

@OndraM
Copy link
Collaborator

OndraM commented Feb 10, 2020

Implement missing W3C WebDriver Release Actions endpoint:

DELETE /session/{session id}/actions

It would best fit into WebDriverActions, however it already includes release() method, which releases mouse button (via OSS buttonup / W3C pointerUp action).

Possible solution is:

  • rename release() method to eg. releaseMouse()
  • add release() method, marked as deprecated, which just calls releaseMouse() (so that we keep backward compatibility)
  • add new releaseActions() method (available only in W3C mode) which will actually execute the release actions endpoint.
  • in php-webdriver 2.0 remove release() method and rename releaseActions() to release().

In case we decide we don't need to implement this in 1.x version and don't need to maintain BC, we can skip steps 2. and 3. and just implement new release() method.

There should also be tests covering the release endpoint.

@OndraM OndraM added this to the 2.0 milestone Feb 10, 2020
@andrewnicols
Copy link
Member

This seems like a sensible approach to me. +1

@OndraM
Copy link
Collaborator Author

OndraM commented Feb 19, 2020

I'm taking that back 😄 . After further evaluation, I think we can safely just change internal implementation of the release() method in W3C mode.

According to the specs:

The Release Actions command is used to release all the keys and pointer buttons that are currently depressed. This causes events to be fired as if the state was released by an explicit series of actions. It also clears all the internal state of the virtual devices.

So basically it is what release() is currently mimicking (via explicit pointerUp action). Plus it releases keyboard and other pointers, not only mouse. And I think we don't need to keep the current "release-mouse-only" implementation in W3C mode - I guess W3C specs comes with the release definition as replacement for this kind of explicit client actions. So it should be safe to use them instead in W3C mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants