lib/page-object/elements/element.rb in page-object-2.2.5 vs lib/page-object/elements/element.rb in page-object-2.2.6
- old
+ new
@@ -29,10 +29,15 @@
#
def present?
element.present?
end
+ def drag_and_drop_on(droppable)
+ droppable_native = droppable.kind_of?(PageObject::Elements::Element) ? droppable.element : droppable
+ element.drag_and_drop_on(droppable_native)
+ end
+
#
# specify plural form of element
#
def self.plural_form
"#{self.to_s.split('::')[-1].
@@ -47,10 +52,10 @@
#
# @param [Integer] (defaults to: 5) seconds to wait before timing out
#
def check_visible(timeout=::PageObject.default_element_wait)
timed_loop(timeout) do |element|
- element.visible?
+ element.present?
end
end
#
# Keeps checking until the element exists