Skip to content

Commit

Permalink
update docs for PointerActions#move_to (#10872)
Browse files Browse the repository at this point in the history
`move_to` has been changed to start from the center of the element rather than the top-left corner.
  • Loading branch information
mockdeep authored Jul 14, 2022
1 parent 7f40eec commit 21c693d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rb/lib/selenium/webdriver/common/interactions/pointer_actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ def pointer_up(button = :left, device: nil, **opts)
end

#
# Moves the pointer to the middle of the given element.
# its location is calculated using getBoundingClientRect.
# Then the pointer is moved to optional offset coordinates from the element.
# Moves the pointer to the in-view center point of the given element.
# Then the pointer is moved to optional offset coordinates.
#
# The element is not scrolled into view.
# MoveTargetOutOfBoundsError will be raised if element with offset is outside the viewport
Expand All @@ -88,10 +87,10 @@ def pointer_up(button = :left, device: nil, **opts)
# driver.action.move_to(el, 100, 100).perform
#
# @param [Selenium::WebDriver::Element] element to move to.
# @param [Integer] right_by Optional offset from the top-left corner. A negative value means
# coordinates to the left of the element.
# @param [Integer] down_by Optional offset from the top-left corner. A negative value means
# coordinates above the element.
# @param [Integer] right_by Optional offset from the in-view center of the
# element. A negative value means coordinates to the left of the center.
# @param [Integer] down_by Optional offset from the in-view center of the
# element. A negative value means coordinates to the top of the center.
# @param [Symbol || String] device optional name of the PointerInput device to move.
# @return [ActionBuilder] A self reference.
#
Expand Down

0 comments on commit 21c693d

Please sign in to comment.