interface WebDriverSearchContext (View source)

The interface for WebDriver and WebDriverElement which is able to search for WebDriverElement inside.

Methods

findElement(WebDriverBy $locator)

Find the first WebDriverElement within this element using the given mechanism.

findElements(WebDriverBy $locator)

Find all WebDriverElements within this element using the given mechanism.

Details

WebDriverElement findElement(WebDriverBy $locator)

Find the first WebDriverElement within this element using the given mechanism.

Parameters

WebDriverBy $locator

Return Value

WebDriverElement

Exceptions

NoSuchElementException

See also

WebDriverBy

WebDriverElement[] findElements(WebDriverBy $locator)

Find all WebDriverElements within this element using the given mechanism.

Parameters

WebDriverBy $locator

Return Value

WebDriverElement[]

A list of all WebDriverElements, or an empty array if nothing matches

See also

WebDriverBy