giorgiosironi / phpunit-selenium

Selenium RC integration for PHPUnit
http://www.phpunit.de/
Other
602 stars 271 forks source link

Add support for Actions #386

Closed paulbriton closed 7 years ago

paulbriton commented 7 years ago

Currently, the classic way to trigger a hover event is to call the moveto() function. With Selemium 3.0.0-beta4 and Firefox 49, you need to use the new Gecko driver and it does/will not implement the moveTo command.

Official bindings all have an Action class that allow us to send sequence of actions. Could it be implemented in these bindings?

If it's not possible, do you know another way to trigger hover event?

Thank's

giorgiosironi commented 7 years ago

Where is the REST api (assuming it's through that) documented? That would map to a new Command class, which would be the recipient of the sequence of actions would be sent, probably on a Session object?

giorgiosironi commented 7 years ago

For low-level bindings, https://w3c.github.io/webdriver/webdriver-spec.html point to an ..._SessionCommand_Actions class:

POST    /session/{session id}/actions   Perform Actions
DELETE  /session/{session id}/actions   Releasing Actions

It's probably worth to have a custom method on Session rather than relying on the inherited CommandsHolder::__call() to create it dynamically, if the constructor gets complicated.

Once this is in place, a more helpful representation of Action Value Objects can be built on top and be transformed into a sequence of calls to Session::actions() when passed to Session. Does this make sense?

paulbriton commented 7 years ago

Closing this since I will not implement Action class in those bindings myself.