\WebDriverBy

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'.

Summary

Methods
Properties
Constants
getMechanism()
getValue()
className()
cssSelector()
id()
name()
linkText()
partialLinkText()
tagName()
xpath()
No public properties found
No constants found
__construct()
No protected properties found
N/A
No private methods found
$mechanism
$value
N/A

Properties

$mechanism

$mechanism : 

Type

$value

$value : 

Type

Methods

getMechanism()

getMechanism() : string

Returns

string

getValue()

getValue() : string

Returns

string

className()

className(  $class_name) : \WebDriverBy

Locates elements whose class name contains the search value; compound class names are not permitted.

Parameters

$class_name

Returns

\WebDriverBy

cssSelector()

cssSelector(  $css_selector) : \WebDriverBy

Locates elements matching a CSS selector.

Parameters

$css_selector

Returns

\WebDriverBy

id()

id(  $id) : \WebDriverBy

Locates elements whose ID attribute matches the search value.

Parameters

$id

Returns

\WebDriverBy

name()

name(  $name) : \WebDriverBy

Locates elements whose NAME attribute matches the search value.

Parameters

$name

Returns

\WebDriverBy

linkText()

linkText(  $link_text) : \WebDriverBy

Locates anchor elements whose visible text matches the search value.

Parameters

$link_text

Returns

\WebDriverBy

partialLinkText()

partialLinkText(  $partial_link_text) : \WebDriverBy

Locates anchor elements whose visible text partially matches the search value.

Parameters

$partial_link_text

Returns

\WebDriverBy

tagName()

tagName(  $tag_name) : \WebDriverBy

Locates elements whose tag name matches the search value.

Parameters

$tag_name

Returns

\WebDriverBy

xpath()

xpath(  $xpath) : \WebDriverBy

Locates elements matching an XPath expression.

Parameters

$xpath

Returns

\WebDriverBy

__construct()

__construct(  $mechanism,   $value) 

Parameters

$mechanism
$value