src/php/DataSift/WebDriver/WebDriverContainer.php
public function getElement($using, $value)
    {
        // try to get the requested element from the open session
        try {
            $results = $this->curl(
                'POST',
                '/element',
                array(
                    'using' => $using,
                    'value' => $value
                )
            );
        }
        catch (E5xx_NoSuchElementWebDriverError $e) {
            // the element does not exist
            throw new E5xx_NoSuchElementWebDriverError(
                500,
                sprintf(
                    'Element not found with %s, %s',
                    $using,
                    $value
                ) . "\n\n" . $e->getMessage(),
                $e->getResults()
            );
        }

        // if we get here, then we can return the element back to the
        // caller :)
        return $this->newWebDriverElement($results['value']);
    }
public function getElement($using, $value)
    {
        // try to get the requested element from the open session
        try {
            $results = $this->curl(
                'POST',
                '/element',
                array(
                    'using' => $using,
                    'value' => $value
                )
            );
        }
        catch (E5xx_NoSuchElementWebDriverError $e) {
            // the element does not exist
            throw new E5xx_NoSuchElementWebDriverError(
                500,
                sprintf(
                    'Element not found with %s, %s',
                    $using,
                    $value
                ) . "\n\n" . $e->getMessage(),
                $e->getResults()
            );
        }

        // if we get here, then we can return the element back to the
        // caller :)
        return $this->newWebDriverElement($results['value']);
    }
public function getElement ( $ using , $ value ) { // try to get the requested element from the open session try { $ results = $ this -> curl ( 'POST' , '/element' , array ( 'using' => $ using , 'value' => $ value ) ) ; } catch ( E5xx_NoSuchElementWebDriverError $ e ) { // the element does not exist throw new E5xx_NoSuchElementWebDriverError ( 500 , sprintf ( 'Element not found with %s, %s' , $ using , $ value ) . "\n\n" . $ e -> getMessage ( ) , $ e -> getResults ( ) ) ; } // if we get here, then we can return the element back to the // caller :) return $ this -> newWebDriverElement ( $ results [ 'value' ] ) ; }
retrieve an element from the currently loaded page

@param  string $using the search strategy
@param  string $value the term to search for

@return WebDriverElement        the element that has been searched for
retrieve an element from the currently loaded page