Method: Selenium::WebDriver::PointerActions#click_and_hold
- Defined in:
- lib/selenium/webdriver/common/interactions/pointer_actions.rb
#click_and_hold(element = nil, button: nil, device: nil) ⇒ ActionBuilder
Clicks (without releasing) in the middle of the given element. This is equivalent to:
driver.action.move_to(element).click_and_hold
180 181 182 183 184 |
# File 'lib/selenium/webdriver/common/interactions/pointer_actions.rb', line 180 def click_and_hold(element = nil, button: nil, device: nil) move_to(element, device: device) if element pointer_down( || :left, device: device) self end |