WebDriverBy
in package
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'.
Tags
Table of Contents
Properties
- $mechanism : string
- $value : string
Methods
- className() : static
- Locates elements whose class name contains the search value; compound class names are not permitted.
- cssSelector() : static
- Locates elements matching a CSS selector.
- getMechanism() : string
- getValue() : string
- id() : static
- Locates elements whose ID attribute matches the search value.
- linkText() : static
- Locates anchor elements whose visible text matches the search value.
- name() : static
- Locates elements whose NAME attribute matches the search value.
- partialLinkText() : static
- Locates anchor elements whose visible text partially matches the search value.
- tagName() : static
- Locates elements whose tag name matches the search value.
- xpath() : static
- Locates elements matching an XPath expression.
- __construct() : mixed
Properties
$mechanism
private
string
$mechanism
$value
private
string
$value
Methods
className()
Locates elements whose class name contains the search value; compound class names are not permitted.
public
static className(string $class_name) : static
Parameters
- $class_name : string
Return values
staticcssSelector()
Locates elements matching a CSS selector.
public
static cssSelector(string $css_selector) : static
Parameters
- $css_selector : string
Return values
staticgetMechanism()
public
getMechanism() : string
Return values
stringgetValue()
public
getValue() : string
Return values
stringid()
Locates elements whose ID attribute matches the search value.
public
static id(string $id) : static
Parameters
- $id : string
Return values
staticlinkText()
Locates anchor elements whose visible text matches the search value.
public
static linkText(string $link_text) : static
Parameters
- $link_text : string
Return values
staticname()
Locates elements whose NAME attribute matches the search value.
public
static name(string $name) : static
Parameters
- $name : string
Return values
staticpartialLinkText()
Locates anchor elements whose visible text partially matches the search value.
public
static partialLinkText(string $partial_link_text) : static
Parameters
- $partial_link_text : string
Return values
statictagName()
Locates elements whose tag name matches the search value.
public
static tagName(string $tag_name) : static
Parameters
- $tag_name : string
Return values
staticxpath()
Locates elements matching an XPath expression.
public
static xpath(string $xpath) : static
Parameters
- $xpath : string
Return values
static__construct()
protected
__construct(mixed $mechanism, mixed $value) : mixed
Parameters
- $mechanism : mixed
- $value : mixed