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.

array
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

NoSuchElementException is thrown in HttpCommandExecutor if no element is found.

See also

WebDriverBy

array findElements(WebDriverBy $locator)

Find all WebDriverElements within this element using the given mechanism.

Parameters

WebDriverBy $locator

Return Value

array

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

See also

WebDriverBy