Skip to content

selenium can't drag Canvas elements #9581

@YinChunGuang

Description

@YinChunGuang

🐛 Bug Report

There are abnormalities in the functions such as click, double-click, drag and drop of Canvas used by Selenium to automate testing.
The specific reason is that Selenium cannot get the elements inside Canvas.

To Reproduce

Exercising a page's dragging and dropping functionailty used to be simple with
Seleniums's Action Builder, but sadly ,it won't work with HTML5 drag and drop .

We use the selenium function 'Actions.dragAndDrop(source,target)' to control the elements inside canvas,it dosen't work that way for selenium can't select the element .

Expected behavior

selenium can drap canvas elements

Test script or set of commands reproducing this issue

Actions actions = new Action(driver);
actions.dragAndDrop(source,target);

The code dosen't work ,also no exception.

Environment

OS: Windows 10
Browser: Chrome
Browser version: 90.0.4430.24
Browser Driver version: 90.0.4430.24
Language Bindings version: Java 8 c

Metadata

Metadata

Assignees

No one assigned

    Labels

    G-w3cRequires change to W3C Spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions