PHP Class WebDriver\Container

Inheritance: extends webdriver\AbstractWebDriver
Show file Open project: instaclick/php-webdriver

Public Methods

Method Description
__call ( $name, $arguments )
__construct ( $url = 'http://localhost:4444/wd/hub' )
element ( string $using = null, string $value = null ) : WebDriver\Element Find element: /session/:sessionId/element (POST) Find child element: /session/:sessionId/element/:id/element (POST) Search for element on page, starting from the document root.
elements ( string $using = null, string $value = null ) : array Find elements: /session/:sessionId/elements (POST) Find child elements: /session/:sessionId/element/:id/elements (POST) Search for multiple elements on page, starting from the document root.
locate ( string $using, string $value ) : array Return JSON parameter for element / elements command

Protected Methods

Method Description
getElementPath ( string $elementId ) : string Get wire protocol URL for an element
webDriverElement ( mixed $value ) : WebDriver\Element | null Return WebDriver\Element wrapper for $value

Private Methods

Method Description
parseArgs ( string $method, array $argv ) : array Parse arguments allowing either separate $using and $value parameters, or as an array containing the JSON parameters

Method Details

__call() public method

public __call ( $name, $arguments )

__construct() public method

public __construct ( $url = 'http://localhost:4444/wd/hub' )

element() public method

Find element: /session/:sessionId/element (POST) Find child element: /session/:sessionId/element/:id/element (POST) Search for element on page, starting from the document root.
public element ( string $using = null, string $value = null ) : WebDriver\Element
$using string the locator strategy to use
$value string the search target
return WebDriver\Element

elements() public method

Find elements: /session/:sessionId/elements (POST) Find child elements: /session/:sessionId/element/:id/elements (POST) Search for multiple elements on page, starting from the document root.
public elements ( string $using = null, string $value = null ) : array
$using string the locator strategy to use
$value string the search target
return array

getElementPath() abstract protected method

Get wire protocol URL for an element
abstract protected getElementPath ( string $elementId ) : string
$elementId string
return string

locate() public method

Return JSON parameter for element / elements command
public locate ( string $using, string $value ) : array
$using string locator strategy
$value string search target
return array

webDriverElement() protected method

Return WebDriver\Element wrapper for $value
protected webDriverElement ( mixed $value ) : WebDriver\Element | null
$value mixed
return WebDriver\Element | null