EventFiringWebElement
in package
implements
WebDriverElement, WebDriverLocatable
Table of Contents
Interfaces
- WebDriverElement
- Interface for an HTML element in the WebDriver framework.
- WebDriverLocatable
- Interface representing basic mouse operations.
Properties
Methods
- __construct() : mixed
- clear() : $this
- If this element is a TEXTAREA or text INPUT element, this will clear the value.
- click() : $this
- Click this element.
- equals() : bool
- Test if two element IDs refer to the same DOM element.
- findElement() : EventFiringWebElement
- Find the first WebDriverElement within this element using the given mechanism.
- findElements() : array<string|int, mixed>
- Find all WebDriverElements within this element using the given mechanism.
- getAttribute() : string
- Get the value of the given attribute of the element.
- getCoordinates() : WebDriverCoordinates
- getCSSValue() : string
- Get the value of a given CSS property.
- getDispatcher() : WebDriverDispatcher
- getElement() : WebDriverElement
- getID() : string
- Get the opaque ID of the element.
- getLocation() : WebDriverPoint
- Get the location of element relative to the top-left corner of the page.
- getLocationOnScreenOnceScrolledIntoView() : WebDriverPoint
- Try scrolling the element into the view port and return the location of element relative to the top-left corner of the page afterwards.
- getShadowRoot() : mixed
- getSize() : WebDriverDimension
- Get the size of element.
- getTagName() : string
- Get the tag name of this element.
- getText() : string
- Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.
- isDisplayed() : bool
- Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute.
- isEnabled() : bool
- Is the element currently enabled or not? This will generally return true for everything but disabled input elements.
- isSelected() : bool
- Determine whether or not this element is selected or not.
- sendKeys() : $this
- Simulate typing into an element, which may set its value.
- submit() : $this
- If this current element is a form, or an element within a form, then this will be submitted to the remote server.
- takeElementScreenshot() : mixed
- dispatch() : mixed
- dispatchOnException() : mixed
- newElement() : static
Properties
$dispatcher
protected
WebDriverDispatcher
$dispatcher
$element
protected
WebDriverElement
$element
Methods
__construct()
public
__construct(WebDriverElement $element, WebDriverDispatcher $dispatcher) : mixed
Parameters
- $element : WebDriverElement
- $dispatcher : WebDriverDispatcher
clear()
If this element is a TEXTAREA or text INPUT element, this will clear the value.
public
clear() : $this
Tags
Return values
$thisclick()
Click this element.
public
click() : $this
Tags
Return values
$thisequals()
Test if two element IDs refer to the same DOM element.
public
equals(WebDriverElement $other) : bool
Parameters
- $other : WebDriverElement
Return values
boolfindElement()
Find the first WebDriverElement within this element using the given mechanism.
public
findElement(WebDriverBy $by) : EventFiringWebElement
Parameters
- $by : WebDriverBy
Tags
Return values
EventFiringWebElementfindElements()
Find all WebDriverElements within this element using the given mechanism.
public
findElements(WebDriverBy $by) : array<string|int, mixed>
Parameters
- $by : WebDriverBy
Tags
Return values
array<string|int, mixed>getAttribute()
Get the value of the given attribute of the element.
public
getAttribute(string $attribute_name) : string
Parameters
- $attribute_name : string
Tags
Return values
stringgetCoordinates()
public
getCoordinates() : WebDriverCoordinates
Return values
WebDriverCoordinatesgetCSSValue()
Get the value of a given CSS property.
public
getCSSValue(string $css_property_name) : string
Parameters
- $css_property_name : string
Tags
Return values
stringgetDispatcher()
public
getDispatcher() : WebDriverDispatcher
Return values
WebDriverDispatchergetElement()
public
getElement() : WebDriverElement
Return values
WebDriverElementgetID()
Get the opaque ID of the element.
public
getID() : string
Tags
Return values
stringgetLocation()
Get the location of element relative to the top-left corner of the page.
public
getLocation() : WebDriverPoint
Tags
Return values
WebDriverPointgetLocationOnScreenOnceScrolledIntoView()
Try scrolling the element into the view port and return the location of element relative to the top-left corner of the page afterwards.
public
getLocationOnScreenOnceScrolledIntoView() : WebDriverPoint
Tags
Return values
WebDriverPointgetShadowRoot()
public
getShadowRoot() : mixed
getSize()
Get the size of element.
public
getSize() : WebDriverDimension
Tags
Return values
WebDriverDimensiongetTagName()
Get the tag name of this element.
public
getTagName() : string
Tags
Return values
stringgetText()
Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.
public
getText() : string
Tags
Return values
stringisDisplayed()
Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute.
public
isDisplayed() : bool
Tags
Return values
boolisEnabled()
Is the element currently enabled or not? This will generally return true for everything but disabled input elements.
public
isEnabled() : bool
Tags
Return values
boolisSelected()
Determine whether or not this element is selected or not.
public
isSelected() : bool
Tags
Return values
boolsendKeys()
Simulate typing into an element, which may set its value.
public
sendKeys(mixed $value) : $this
Parameters
- $value : mixed
Tags
Return values
$thissubmit()
If this current element is a form, or an element within a form, then this will be submitted to the remote server.
public
submit() : $this
Tags
Return values
$thistakeElementScreenshot()
public
takeElementScreenshot([mixed $save_as = null ]) : mixed
Parameters
- $save_as : mixed = null
dispatch()
protected
dispatch(mixed $method, mixed ...$arguments) : mixed
Parameters
- $method : mixed
- $arguments : mixed
dispatchOnException()
protected
dispatchOnException(WebDriverException $exception) : mixed
Parameters
- $exception : WebDriverException
newElement()
protected
newElement(WebDriverElement $element) : static
Parameters
- $element : WebDriverElement