A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://seleniumhq.github.io/selenium/docs/api/dotnet/webdriver/OpenQA.Selenium.IWebElement.html below:

Interface IWebElement

Interface IWebElement
Namespace
OpenQA.Selenium
Assembly
WebDriver.dll

Defines the interface through which the user controls elements on the page.

public interface IWebElement : ISearchContext
Inherited Members
Properties Displayed

Gets a value indicating whether or not this element is displayed.

Property Value
bool
Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

Enabled

Gets a value indicating whether or not this element is enabled.

Property Value
bool
Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

Location

Gets a Point object containing the coordinates of the upper-left corner of this element relative to the upper-left corner of the page.

Property Value
Point
Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

Selected

Gets a value indicating whether or not this element is selected.

Property Value
bool
Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

Size

Gets a Size object containing the height and width of this element.

Property Value
Size
Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

TagName

Gets the tag name of this element.

Property Value
string
Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

Text

Get the visible (i.e. not hidden by CSS) text of this element, including sub-elements.

Property Value
string
Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

Methods Clear()

Clears the content of this element.

Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

Click()

Clicks this element.

Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

GetAttribute(string)

Gets the value of the specified attribute for this element.

string? GetAttribute(string attributeName)
Parameters
attributeName string

The name of the attribute.

Returns
string

The attribute's current value. Returns a null if the value is not set.

Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

GetCssValue(string)

Gets the value of a CSS property of this element.

string GetCssValue(string propertyName)
Parameters
propertyName string

The name of the CSS property to get the value of.

Returns
string

The value of the specified CSS property.

Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

GetDomAttribute(string)

Gets the value of a declared HTML attribute of this element.

string? GetDomAttribute(string attributeName)
Parameters
attributeName string

The name of the HTML attribute to get the value of.

Returns
string

The HTML attribute's current value. Returns a null if the value is not set or the declared attribute does not exist.

Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

GetDomProperty(string)

Gets the value of a JavaScript property of this element.

string? GetDomProperty(string propertyName)
Parameters
propertyName string

The name of the JavaScript property to get the value of.

Returns
string

The JavaScript property's current value. Returns a null if the value is not set or the property does not exist.

Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

GetShadowRoot()

Gets the representation of an element's shadow root for accessing the shadow DOM of a web component.

ISearchContext GetShadowRoot()
Returns
ISearchContext

A shadow root representation.

Exceptions
NoSuchShadowRootException

Thrown when this element does not have a shadow root.

SendKeys(string)

Simulates typing text into the element.

void SendKeys(string text)
Parameters
text string

The text to type into the element.

Exceptions
InvalidElementStateException

Thrown when the target element is not enabled.

StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.

See Also
Submit()

Submits this element to the web server.

Exceptions
StaleElementReferenceException

Thrown when the target element is no longer valid in the document DOM.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4