My code does not working on demo AngularJS Drag and Drop list: http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/simple
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
import time
import os
driver = webdriver.Firefox()
driver.get("http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/simple")
time.sleep(2)
source_element = driver.find_element_by_xpath('/html/body/div[2]/div[2]/div[2]/div[1]/div[1]/div[1]/div/div[2]/ul/li[1]')
dest_element = driver.find_element_by_xpath('/html/body/div[2]/div[2]/div[2]/div[1]/div[1]/div[2]/div/div[2]/ul/li[3]')
actions = ActionChains(driver)
actions.drag_and_drop(source_element, dest_element)
actions.perform()
time.sleep(10)
os.system("taskkill /im firefox.exe /f")
I try many solutions, but it is not working. By my opinion, problem is in "drop" action.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…