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

        return $this->newElement($raw_element['ELEMENT']);
    }
public function findElement(WebDriverBy $by)
    {
        $params = ['using' => $by->getMechanism(), 'value' => $by->getValue()];
        $raw_element = $this->execute(
            DriverCommand::FIND_ELEMENT,
            $params
        );

        return $this->newElement($raw_element['ELEMENT']);
    }
public function findElement ( WebDriverBy $ by ) { $ params = [ 'using' => $ by -> getMechanism ( ) , 'value' => $ by -> getValue ( ) ] ; $ raw_element = $ this -> execute ( DriverCommand :: FIND_ELEMENT , $ params ) ; return $ this -> newElement ( $ raw_element [ 'ELEMENT' ] ) ; }
Find the first WebDriverElement using the given mechanism.

@param WebDriverBy $by
@return RemoteWebElement NoSuchElementException is thrown in HttpCommandExecutor if no element is found.
@see WebDriverBy
Find the first WebDriverElement using the given mechanism .