Drag and Drop is not working, but in selenium IDE is working

I have a questions about drag and drop keyword.
when I use drag and drop keyword is not working. However, when I user selenium IDE to record my actions. It is working on selenium IDE.

I try to use python +webdriver, but still not working.
error message always shows “Message: javascript error: Failed to execute ‘elementsFromPoint’ on ‘Document’: The provided double value is non-finite”

Anyone has any idea about how selenium IDE handle drag and drop object.

The error message feels like you have some issues with coordinates, not 100% sure thought…

About drag and drop itself, Selenium (and thus, also robotframework-seleniumlibrary) does not support html5 drag and drop events (havent checked Selenium4 if thats changed) but its possible to generate those via Javascript. SeleniumTestability has html5 support build in into drag and drop keyword but does it help you in this case, hard to say …

Could you share your robot keywords what you are really doing that fails on you ?

Hi rasjani,

I use drag and drop keyword
Drag And Drop //li[@class=“is-type-3”]/a[1] css=.sensor:nth-child(7)
after running on robot framework IDE, it shows pass, but not really do drag and drop .

My system is windows. However, I use mac (python 2.7 + webdriven ) is working.

I try to observe the what happen in my html. when I drop on my destination, the html tag is change
before drop, the html is

  • before I put the object to destination, the html changes to

  • once put the object on destination, the html is disappear.

    but if it is my javascript or html problem, it should be not working for all tools. However, it works on my mac and selenium IDE on windows system.

    really need a solution.

  • Try SeleniumTestability’s drag&drop keyword which adds “html5” boolean to the keyword … Might work, might not.

    1 Like

    thanks for you suggestion. it is working.
    it is great help for me.

    The functions available in selenium for drag and drop do not work properly.