drag_to_element

The command to drag the current element to the given element.

Syntax

Element.drag_to_element(to_element)

Usage

correct usage
element = py.get('#drop-here')
py.get('#drag-this').drag_to_element(element)
incorrect usage
# Errors, 'drag_to_element' takes an Element
py.get('#drag-this').drag_to_element('#drop-here')

# Use the .drag_to() command instead

---or---

# Errors, `drag_to_element` and `drag_to` are not part of the Pylenium object
element = py.get('#drop-here')
py.drag_to_element(element)

Arguments

  • to_element(Element) - The destination element to drag to.

Yields

  • (Element) The current element that was dragged.

Last updated