WebElement Methods

The WebElement type exposes the following members.

Methods
  NameDescription
Public methodAsSelect
Cast the WebElement to a Select element
Public methodAsTable
Cast the WebElement to a Select element
Public methodAttribute
Gets the attribute value.
Public methodClear
Clears the text if it’s a text entry element.
Public methodClick
Clicks the element.
Public methodClickAndHold
Clicks the element and hold.
Public methodClickByOffset
Clicks at the element offset.
Public methodClickContext
Rigth clicks the element
Public methodClickDouble
Double clicks the element.
Public methodCssValue
Returns the value of a CSS property
Public methodDragAndDropToOffset
Drag and drop the element to an offset
Public methodDragAndDropToWebElement
Drag and drop the element to another element
Public methodEquals(Object)
Determines whether the specified instances are considered equal.
(Overrides ObjectEquals(Object).)
Public methodEquals(WebElement)
Compares if two web elements are equal
Public methodCode exampleExecuteAsyncScript
Execute an asynchronous piece of JavaScript in the context of the current element
Public methodCode exampleExecuteScript
Executes a piece of JavaScript in the context of the current element.
Public methodCode exampleFindElement
Find the first WebElement using the given method.
(Inherited from SearchContext.)
Public methodFindElementBy
Finds the first child element matching the given mechanism and value.
(Inherited from SearchContext.)
Public methodFindElementByClass
Finds the first element matching the specified CSS class.
(Inherited from SearchContext.)
Public methodFindElementByCss
Finds the first element matching the specified CSS selector.
(Inherited from SearchContext.)
Public methodFindElementById
Finds the first element matching the specified id.
(Inherited from SearchContext.)
Public methodFindElementByLinkText
Finds the first element matching the specified link text.
(Inherited from SearchContext.)
Public methodFindElementByName
Finds the first element matching the specified name.
(Inherited from SearchContext.)
Public methodFindElementByPartialLinkText
Finds the first of elements that match the part of the link text supplied
(Inherited from SearchContext.)
Public methodFindElementByTag
Finds the first element matching the specified tag name.
(Inherited from SearchContext.)
Public methodFindElementByXPath
Finds the first element matching the specified XPath query.
(Inherited from SearchContext.)
Public methodCode exampleFindElements
Find all elements within the current context using the given mechanism.
(Inherited from SearchContext.)
Public methodFindElementsBy
Finds all child elements matching the given mechanism and value.
(Inherited from SearchContext.)
Public methodFindElementsByClass
Finds elements matching the specified CSS class.
(Inherited from SearchContext.)
Public methodFindElementsByCss
Finds elements matching the specified CSS selector.
(Inherited from SearchContext.)
Public methodFindElementsById
Finds elements matching the specified id.
(Inherited from SearchContext.)
Public methodFindElementsByLinkText
Finds elements matching the specified link text.
(Inherited from SearchContext.)
Public methodFindElementsByName
Finds elements matching the specified name.
(Inherited from SearchContext.)
Public methodFindElementsByPartialLinkText
Finds the first of elements that match the part of the link text supplied
(Inherited from SearchContext.)
Public methodFindElementsByTag
Finds elements matching the specified tag name.
(Inherited from SearchContext.)
Public methodFindElementsByXPath
Finds elements matching the specified XPath query.
(Inherited from SearchContext.)
Public methodGetHashCode
Returns the hash code for this element
(Overrides ObjectGetHashCode.)
Public methodHoldKeys
Press a key and hold
Public methodIsElementPresent
"Verifies that the specified element is somewhere on the page."
(Inherited from SearchContext.)
Public methodLocation
Returns the location of the element in the renderable canvas
Public methodLocationInView
Gets the location of an element relative to the origin of the view port.
Public methodReleaseKeys
Release a key
Public methodReleaseMouse
Release a click
Public methodScrollIntoView
Scrolls the current element into the visible area of the browser window.
Public methodCode exampleSendKeys
Simulates typing into the element.
Public methodSerializeJson
Public methodSize
Returns the size of the element
Public methodSubmit
Submits a form.
Public methodTakeScreenshot
Gets the screenshot of the current element
Public methodText
Gets the text of the element.
Public methodTextAsNumber
Return a number parsed from the text
Public methodTextMatch
Searches the specified input string for an occurrence of the regular expression supplied in the pattern parameter.
Public methodTextMatches
Returns all the occurences matching the regular expression.
Public methodUntilT
Waits for the delegate function to return not null or true
Public methodValue
Returns the value attribute
Public methodWaitAttribute
Waits for an attribute
Public methodWaitCssValue
Waits for a CSS property
Public methodWaitDisplayed
Waits for the element to be displayed.
Public methodWaitEnabled
Waits for the element to be enabled.
Public methodWaitForScript
Waits for a script to return true or not null.
Public methodWaitNotAttribute
Waits for a different attribute
Public methodWaitNotCssValue
Waits for a different CSS property
Public methodWaitNotElement
Waits for an element to be missing.
(Inherited from SearchContext.)
Public methodWaitNotText
Waits for a different text
Public methodWaitRemoval
Wait for the web element to be removed from the DOM.
Public methodWaitSelection
Waits for the element to be selected or not.
Public methodWaitText
Waits for text
Top
See Also