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 NoSuchElementException is thrown in HttpCommandExecutor if no element is found.

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