Selenium WebElement
All WebElement methods available when using the Selenium driver.
You get a RemoteWebElement from driver.findElement() or driver.findElements().
Actions
click()
Click the element.
sendKeys(…text)
Type text into the element or send key sequences.
clear()
Clear the element’s value (for input/textarea).
submit()
Submit the form containing this element.
Content
getText()
Get the visible text of the element.
Returns string
getAttribute(name)
Get an attribute value.
Returns string | null
getCssValue(propertyName)
Get a CSS property value.
Returns string
getTagName()
Get the element’s tag name.
Returns string
getRect()
Get the element’s position and dimensions.
Returns { x: number, y: number, width: number, height: number }
State Checks
isDisplayed()
Check if the element is visible.
Returns boolean
isEnabled()
Check if the element is enabled.
Returns boolean
isSelected()
Check if the element is selected (for checkboxes, radio buttons, options).
Returns boolean
Screenshots
takeScreenshot()
Take a screenshot of this specific element.
Returns string — base64-encoded PNG.
Queries
findElement(locator)
Find a child element within this element.
Returns RemoteWebElement
findElements(locator)
Find all matching child elements within this element.
Returns RemoteWebElement[]

