HumHub Documentation (unofficial)

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
see

WebDriver::findElement, WebDriverElement::findElement

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

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
static

cssSelector()

Locates elements matching a CSS selector.

public static cssSelector(string $css_selector) : static
Parameters
$css_selector : string
Return values
static

getMechanism()

public getMechanism() : string
Return values
string

getValue()

public getValue() : string
Return values
string

id()

Locates elements whose ID attribute matches the search value.

public static id(string $id) : static
Parameters
$id : string
Return values
static

linkText()

Locates anchor elements whose visible text matches the search value.

public static linkText(string $link_text) : static
Parameters
$link_text : string
Return values
static

name()

Locates elements whose NAME attribute matches the search value.

public static name(string $name) : static
Parameters
$name : string
Return values
static

partialLinkText()

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
static

tagName()

Locates elements whose tag name matches the search value.

public static tagName(string $tag_name) : static
Parameters
$tag_name : string
Return values
static

xpath()

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

        
On this page

Search results