Get Html Elements

Extract details about a set of html elements returned from css path or xpath.

Rinkt Get Html Elements Designer

Designer Properties#

See Web Event Main Properties.

  1. Extracted Elements The array of extracted elements using Css Path or XPath. For more details about an extracted element please check WebElementData.

Properties#

Get Html Elements properties

Web Event Main Properties#

See Web Event Main Properties.

General Properties#

See Web Event General Properties.

Misc#

See Misc.

Out Error#

See Out Error.

Out Properties#

  1. Extracted Elements The array of extracted elements using Css Path or XPath. For more details about an extracted element please check WebElementData.
  2. Was Successful Returns true if the element was found and false otherwise. If the value is set to a variable, the workflow will not be stopped when the element is not found. It may be set to a variable of type bool that can be created under Variables at the bottom of the workflow.

Web Event Advanced Properties#

See Web Event Advanced Properties.

WebElementData#

public class WebElementData
{
public string InnerText { get; set; }
public int OffsetHeight { get; set; }
public int OffsetLeft { get; set; }
public int OffsetTop { get; set; }
public int OffsetWidth { get; set; }
public string Title { get; set; }
public ElementAttribute[] ElementAttributes { get; set; }
public Dictionary<string, string> AttributesByName { get; set; }
public int ClientHeight { get; set; }
public int ClientLeft { get; set; }
public int ClientTop { get; set; }
public int ClientWidth { get; set; }
public string InnerHTML { get; set; }
public string LocalName { get; set; }
public string OuterHTML { get; set; }
public string Prefix { get; set; }
public int ScrollHeight { get; set; }
public int ScrollLeft { get; set; }
public int ScrollTop { get; set; }
public int ScrollWidth { get; set; }
public string TagName { get; set; }
public string NamespaceURI { get; set; }
public string BaseURI { get; set; }
public string NodeName { get; set; }
public long ChildrenCount { get; set; }
public string[] ChildrenTags { get; set; }
public decimal? ScreenX { get; set; }
public decimal? ScreenY { get; set; }
}

Properties of WebElementData#

  1. InnerText The "rendered" text content of a node and its descendants.
  2. OffsetHeight Typically, offsetHeight is a measurement in pixels of the element's CSS height, including any borders, padding, and horizontal scrollbars (if rendered). It does not include the height of pseudo-elements such as ::before or ::after. For the document body object, the measurement includes total linear content height instead of the element's CSS height. Floated elements extending below other linear content are ignored.
  3. OffsetLeft The number of pixels that the upper left corner of the current element is offset to the left within the HTMLElement.offsetParent node.
  4. OffsetTop The distance of the outer border of the current element relative to the inner border of the top of the offsetParent node.
  5. OffsetWidth Typically, offsetWidth is a measurement in pixels of the element's CSS width, including any borders, padding, and vertical scrollbars (if rendered). It does not include the width of pseudo-elements such as ::before or ::after.
  6. Title The title of the element.
  7. ElementAttributes The element attributes at runtime, like id, class .....
public class ElementAttribute
{
public string name { get; set; }
public string prefix { get; set; }
public string value { get; set; }
}
  1. AttributesByName The element attributes at runtime, like id, class .... represented as Dictionary(string, string).
  2. ClientHeight It is zero for elements with no CSS or inline layout boxes; otherwise, it's the inner height of an element in pixels. It includes padding but excludes borders, margins, and horizontal scrollbars (if present).
  3. ClientLeft The width of the left border of an element in pixels.
  4. ClientTop The width of the top border of the element in pixels.
  5. ClientWidth It is zero for inline elements and elements with no CSS; otherwise, it's the inner width of an element in pixels. It includes padding but excludes borders, margins, and vertical scrollbars (if present).
  6. InnerHTML The HTML or XML markup contained within the element.
  7. LocalName The local part of the qualified name of this element.
  8. OuterHTML The serialized HTML fragment describing the element including its descendants.
  9. Prefix The element namespace prefix.
  10. ScrollLeft The number of pixels that an element's content is scrolled from its left edge.
  11. ScrollTop The number of pixels that an element's content is scrolled vertically.
  12. ScrollWidth The width of the element's content, including content not visible on the screen due to overflow.
  13. ScrollHeight The height of an element's content, including content not visible on the screen due to overflow.
  14. TagName The tag name of the element.
  15. NamespaceURI The element name space URI.
  16. BaseURI The url for the page.
  17. NodeName The element node name.
  18. ChildrenCount The number of children of this element.
  19. ChildrenTags The tags of all its children.
  20. ScreenX The horizontal distance, in CSS pixels, of the left border of the element to the left side of the screen.
  21. ScreenY The vertical distance, in CSS pixels, of the top border of the element to the top edge of the screen.

Example#

Get password input details

In this example, we navigate to http://demo.guru99.com/test/newtours/register.php and search for all inputs of type password and display their name(using the name property).