Extend dragAndDrop command to allow offset values
See original GitHub issueIs your feature request related to a problem? Please describe. Currently, dragAndDrop command allows only to move one element to another
$(selector).dragAndDrop(target, duration)
There is no way to move a single element to a certain offset
Describe the solution you’d like
Create a new command dragTo
, which performs the same actions, but allows to specify offset, instead of a target selector
$(selector).dragTo(xoffset, yoffset, duration)
Describe alternatives you’ve considered
Currently I can implement this myself, using performActions
command, but this is not cross-browser and I had to maintain w3c/jsonwp implementations, which is cumbersome.
Having this in the webdriverio library might be useful for somebody.
Additional context I am testing a slider component, which requires dragging interactions, but there is no target element, the slider itself is being dragged. The proposed command could resolve my use-case
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (5 by maintainers)
Here is our custom implementation
Fixed in #5282