Method: Selenium::WebDriver::PointerActions#click
- Defined in:
- lib/selenium/webdriver/common/interactions/pointer_actions.rb
#click(element = nil, button: nil, device: nil) ⇒ ActionBuilder
Clicks in the middle of the given element. Equivalent to:
driver.action.move_to(element).click
When no element is passed, the current mouse position will be clicked.
226 227 228 229 230 231 |
# File 'lib/selenium/webdriver/common/interactions/pointer_actions.rb', line 226 def click(element = nil, button: nil, device: nil) move_to(element, device: device) if element pointer_down( || :left, device: device) pointer_up( || :left, device: device) self end |