Method: Selenium::WebDriver::PointerActions#release

Defined in:
lib/selenium/webdriver/common/interactions/pointer_actions.rb

#release(button: nil, device: nil) ⇒ ActionBuilder

Releases the depressed left mouse button at the current mouse location.

Examples:

Releasing an element after clicking and holding it


el = driver.find_element(id: "some_id")
driver.action.click_and_hold(el).release.perform

Parameters:

  • device (Symbol || String) (defaults to: nil)

    optional name of the PointerInput device with the button that will be released

Returns:



199
200
201
202
# File 'lib/selenium/webdriver/common/interactions/pointer_actions.rb', line 199

def release(button: nil, device: nil)
  pointer_up(button || :left, device: device)
  self
end