$mechanism
$mechanism :
The basic 8 mechanisms supported by webdriver to locate a web element.
ie. 'class name', 'css selector', 'id', 'name', 'link text',
'partial link text', 'tag name' and 'xpath'.
className( $class_name) : \WebDriverBy
Locates elements whose class name contains the search value; compound class names are not permitted.
| $class_name |
cssSelector( $css_selector) : \WebDriverBy
Locates elements matching a CSS selector.
| $css_selector |
id( $id) : \WebDriverBy
Locates elements whose ID attribute matches the search value.
| $id |
name( $name) : \WebDriverBy
Locates elements whose NAME attribute matches the search value.
| $name |
linkText( $link_text) : \WebDriverBy
Locates anchor elements whose visible text matches the search value.
| $link_text |
partialLinkText( $partial_link_text) : \WebDriverBy
Locates anchor elements whose visible text partially matches the search value.
| $partial_link_text |
tagName( $tag_name) : \WebDriverBy
Locates elements whose tag name matches the search value.
| $tag_name |
xpath( $xpath) : \WebDriverBy
Locates elements matching an XPath expression.
| $xpath |