WebDriverElement
interface WebDriverElement implements WebDriverSearchContext (View source)
Interface for an HTML element in the WebDriver framework.
Methods
Find the first WebDriverElement within this element using the given mechanism.
Find all WebDriverElements within this element using the given mechanism.
If this element is a TEXTAREA or text INPUT element, this will clear the value.
Click this element.
Get the value of a the given attribute of the element.
Get the value of a given CSS property.
Get the location of element relative to the top-left corner of the page.
Try scrolling the element into the view port and return the location of element relative to the top-left corner of the page afterwards.
Get the size of element.
Get the tag name of this element.
Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.
Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute.
Is the element currently enabled or not? This will generally return true for everything but disabled input elements.
Determine whether or not this element is selected or not.
Simulate typing into an element, which may set its value.
If this current element is a form, or an element within a form, then this will be submitted to the remote server.
Get the opaque ID of the element.
Details
WebDriverElement
findElement(WebDriverBy $locator)
Find the first WebDriverElement within this element using the given mechanism.
WebDriverElement[]
findElements(WebDriverBy $locator)
Find all WebDriverElements within this element using the given mechanism.
WebDriverElement
clear()
If this element is a TEXTAREA or text INPUT element, this will clear the value.
WebDriverElement
click()
Click this element.
string|null
getAttribute(string $attribute_name)
Get the value of a the given attribute of the element.
string
getCSSValue(string $css_property_name)
Get the value of a given CSS property.
WebDriverPoint
getLocation()
Get the location of element relative to the top-left corner of the page.
WebDriverPoint
getLocationOnScreenOnceScrolledIntoView()
Try scrolling the element into the view port and return the location of element relative to the top-left corner of the page afterwards.
WebDriverDimension
getSize()
Get the size of element.
string
getTagName()
Get the tag name of this element.
string
getText()
Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, without any leading or trailing whitespace.
bool
isDisplayed()
Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute.
bool
isEnabled()
Is the element currently enabled or not? This will generally return true for everything but disabled input elements.
bool
isSelected()
Determine whether or not this element is selected or not.
WebDriverElement
sendKeys(mixed $value)
Simulate typing into an element, which may set its value.
WebDriverElement
submit()
If this current element is a form, or an element within a form, then this will be submitted to the remote server.
string
getID()
Get the opaque ID of the element.