lib/Remote/RemoteWebDriver.php
public function findElements(WebDriverBy $by)
    {
        $params = ['using' => $by->getMechanism(), 'value' => $by->getValue()];
        $raw_elements = $this->execute(
            DriverCommand::FIND_ELEMENTS,
            $params
        );

        $elements = [];
        foreach ($raw_elements as $raw_element) {
            $elements[] = $this->newElement($raw_element['ELEMENT']);
        }

        return $elements;
    }
public function findElements(WebDriverBy $by)
    {
        $params = ['using' => $by->getMechanism(), 'value' => $by->getValue()];
        $raw_elements = $this->execute(
            DriverCommand::FIND_ELEMENTS,
            $params
        );

        $elements = [];
        foreach ($raw_elements as $raw_element) {
            $elements[] = $this->newElement($raw_element['ELEMENT']);
        }

        return $elements;
    }
public function findElements ( WebDriverBy $ by ) { $ params = [ 'using' => $ by -> getMechanism ( ) , 'value' => $ by -> getValue ( ) ] ; $ raw_elements = $ this -> execute ( DriverCommand :: FIND_ELEMENTS , $ params ) ; $ elements = [ ] ; foreach ( $ raw_elements as $ raw_element ) { $ elements [ ] = $ this -> newElement ( $ raw_element [ 'ELEMENT' ] ) ; } return $ elements ; }
Find all WebDriverElements within the current page using the given mechanism.

@param WebDriverBy $by
@return RemoteWebElement[] A list of all WebDriverElements, or an empty array if nothing matches
@see WebDriverBy
Find all WebDriverElements within the current page using the given mechanism .