Skip to content

Implement Release Actions endpoint #755

Open

Description

@OndraM

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.

Activity

  1. added this to the 2.0 milestone on Feb 10, 2020
  2. andrewnicols commented on Feb 14, 2020

    @andrewnicols
    Member

    This seems like a sensible approach to me. +1

  3. OndraM commented on Feb 19, 2020

    @OndraM
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions