In order to automate drag and drop functionality, I am using Python Webdriver. While it worked for some apps, it didn't work for the one below.
URL: https://www.w3schools.com/html/html5_draganddrop.asp
Trying to put this image into this empty div.
The following have been tried: everything has been imported, there is no syntax error in the code.
s = wait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//*[@id='drag1']")))
d = wait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//*[@id='div2']")))
action_chains.drag_and_drop(s, d).perform()
Some questions:
- Can't I do this without using Jquery ?
- When I place the cursor on an empty div during automation, it drops in the right place (empty div), why is that?
- Wherever my mouse cursor is, it drops there. Why?
Can anyone please help me figure out why this is happening? I have been trying to figure it out for 3 hours straight.