protected function newWebDriverElement($value)
    {
        // is the returned element in the format we expect?
        if (!array_key_exists('ELEMENT', (array) $value)) {
            // no, it is not
            return null;
        }

        return new WebDriverElement(
            $this->getElementPath($value['ELEMENT']), // url
            $value['ELEMENT'] // id
        );
    }
protected function newWebDriverElement($value)
    {
        // is the returned element in the format we expect?
        if (!array_key_exists('ELEMENT', (array) $value)) {
            // no, it is not
            return null;
        }

        return new WebDriverElement(
            $this->getElementPath($value['ELEMENT']), // url
            $value['ELEMENT'] // id
        );
    }
protected function newWebDriverElement ( $ value ) { // is the returned element in the format we expect? if ( ! array_key_exists ( 'ELEMENT' , ( array ) $ value ) ) { // no, it is not return null ; } return new WebDriverElement ( $ this -> getElementPath ( $ value [ 'ELEMENT' ] ) , // url $ value [ 'ELEMENT' ] // id ) ; }
helper method to wrap an element inside the WebDriverElement
object

@param  array $value the raw element data returned from webdriver

@return WebDriverElement the WebDriverElement object for the raw
element
helper method to wrap an element inside the WebDriverElement object