0

The drag action is working, but instead of drop in the selected area, drop on mouse pointer position. Someone has any idea? Thanks

def test_drag_action_to_tsb(self, driver):
    source_element = driver.find_element_by_xpath('//*[@id="bzm-action-builder-tabs-tabpane-ACTION"]/ul/li[1]')
    base.wait_for_element(driver, By.CLASS_NAME, 'scriptless-scenarios-steps-panel')
    dest_element = driver.find_element_by_class_name(self, 'scriptless-scenarios-steps-panel')
    ActionChains(driver).click_and_hold(source_element).move_to_element(dest_element).release(dest_element).perform()
    time.sleep(5)
    assert base.is_text_present(driver, 'is Required')
    time.sleep(5)
Morticella
  • 69
  • 8

1 Answers1

0

Depending on selenium documentation following codes should work :

ActionChains(driver). drag_and_drop(source_element, dest_element).perform()
sayhan
  • 1,168
  • 1
  • 16
  • 22