Module Selenium::WebDriver::SearchContext
In: lib/selenium/webdriver/common/search_context.rb

Methods

Constants

FINDERS = { :class => 'ClassName', :class_name => 'ClassName', :css => 'CssSelector', :id => 'Id', :link => 'LinkText', :link_text => 'LinkText', :name => 'Name', :partial_link_text => 'PartialLinkText', :tag_name => 'TagName', :xpath => 'Xpath', }

Public Instance methods

Find the first element matching the given arguments.

When using Element#find_element with :xpath, be aware that webdriver follows standard conventions: a search prefixed with "//" will search the entire document, not just the children of this current node. Use ".//" to limit your search to the children of the receiving Element.

@param [:class, :class_name, :id, :link_text, :link, :partial_link_text, :name, :tag_name, :xpath] how @param [String] what @return [WebDriver::Element]

@raise [NoSuchElementError] if the element doesn‘t exist

Find all elements matching the given arguments

@see SearchContext#find_element

@param [:class, :class_name, :id, :link_text, :link, :partial_link_text, :name, :tag_name, :xpath] how @param [String] what @return [Array<WebDriver::Element>]

[Validate]