我尝试设置一个测试拖动1元素(从侧面选项栏)
将其拖放到画布页面上(使用cytoscape.js库)
实际结果是-测试工作正常-他将元素拖动到画布区域,但没有放下。
我尝试过:
appliance_to_drag_and_drop =
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CLASS_NAME, "logo tap")))
target_element =
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "mainCanvas")))
action_chains = ActionChains(driver)
time.sleep(5)
action_chains.drag_and_drop(appliance_to_drag_and_drop,target_element).perform()
time.sleep(5)
action_chains.click(target_element)