1<?php
2
3namespace Facebook\WebDriver;
4
5/**
6 * The interface for WebDriver and WebDriverElement which is able to search for
7 * WebDriverElement inside.
8 */
9interface WebDriverSearchContext
10{
11    /**
12     * Find the first WebDriverElement within this element using the given
13     * mechanism.
14     *
15     * @param WebDriverBy $locator
16     * @return WebDriverElement NoSuchElementException is thrown in
17     *    HttpCommandExecutor if no element is found.
18     * @see WebDriverBy
19     */
20    public function findElement(WebDriverBy $locator);
21
22    /**
23     * Find all WebDriverElements within this element using the given mechanism.
24     *
25     * @param WebDriverBy $locator
26     * @return WebDriverElement[] A list of all WebDriverElements, or an empty array if
27     *    nothing matches
28     * @see WebDriverBy
29     */
30    public function findElements(WebDriverBy $locator);
31}
32