Method: Selenium::WebDriver::Element#click
- Defined in:
- lib/selenium/webdriver/common/element.rb
permalink #click ⇒ Object
Click this element. If this causes a new page to load, this method will attempt to block until the page has loaded. At this point, you should discard all references to this element and any further operations performed on this element will raise a StaleElementReferenceError unless you know that the element and the page will still be present. If click() causes a new page to be loaded via an event or is done by sending a native event then the method will not wait for it to be loaded and the caller should verify that a new page has been loaded.
There are some preconditions for an element to be clicked. The element must be visible and it must have a height and width greater then 0.
Equivalent to:
driver.action.click(element)
76 77 78 |
# File 'lib/selenium/webdriver/common/element.rb', line 76 def click bridge.click_element @id end |