Properties

Methods

sendKeys()

sendKeys(mixed  $value) : $this

Simulate typing into an element, which may set its value.

Parameters

mixed $value

Throws

\WebDriverException

Returns

$this

click()

click() : $this

Click this element.

Throws

\WebDriverException

Returns

$this

findElements()

findElements(\WebDriverBy  $by) : array

Parameters

\WebDriverBy $by

Throws

\WebDriverException

Returns

array

clear()

clear() : $this

If this element is a TEXTAREA or text INPUT element, this will clear the value.

Throws

\WebDriverException

Returns

$this

getAttribute()

getAttribute(string  $attribute_name) : string

Get the value of a the given attribute of the element.

Parameters

string $attribute_name

Throws

\WebDriverException

Returns

string

getCSSValue()

getCSSValue(string  $css_property_name) : string

Get the value of a given CSS property.

Parameters

string $css_property_name

Throws

\WebDriverException

Returns

string

getLocation()

getLocation() : \WebDriverLocation

Get the location of element relative to the top-left corner of the page.

Throws

\WebDriverException

Returns

\WebDriverLocation

getLocationOnScreenOnceScrolledIntoView()

getLocationOnScreenOnceScrolledIntoView() : \WebDriverLocation

Try scrolling the element into the view port and return the location of element relative to the top-left corner of the page afterwards.

Throws

\WebDriverException

Returns

\WebDriverLocation

getSize()

getSize() : \WebDriverDimension

Get the size of element.

Throws

\WebDriverException

Returns

\WebDriverDimension

getTagName()

getTagName() : string

Get the tag name of this element.

Throws

\WebDriverException

Returns

string

getText()

getText() : string

Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.

Throws

\WebDriverException

Returns

string

isDisplayed()

isDisplayed() : boolean

Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute.

Throws

\WebDriverException

Returns

boolean

isEnabled()

isEnabled() : boolean

Is the element currently enabled or not? This will generally return true for everything but disabled input elements.

Throws

\WebDriverException

Returns

boolean

isSelected()

isSelected() : boolean

Determine whether or not this element is selected or not.

Throws

\WebDriverException

Returns

boolean

submit()

submit() : $this

If this current element is a form, or an element within a form, then this will be submitted to the remote server.

Throws

\WebDriverException

Returns

$this

getID()

getID() : string

Get the opaque ID of the element.

Throws

\WebDriverException

Returns

string

equals()

equals(\WebDriverElement  $other) : boolean

Test if two element IDs refer to the same DOM element.

Parameters

\WebDriverElement $other

Returns

boolean

dispatch()

dispatch(mixed  $method) : void

Parameters

mixed $method

dispatchOnException()

dispatchOnException(  $exception) 

Parameters

$exception