Open topic with navigation

com.hp.lft.sdk.web

## Class WebElementDescription

- java.lang.Object
- - com.hp.lft.sdk.internal.PropertiesDescriptionBase
  - - com.hp.lft.sdk.PropertiesDescription
    - - com.hp.lft.sdk.DescriptionBase
      - - com.hp.lft.sdk.web.WebBaseDescription
        - - com.hp.lft.sdk.web.WebElementDescription

- All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, java.lang.Cloneable
  Direct Known Subclasses:
    AccordionDescription, AreaDescription, ButtonDescription, CalendarDescription, CarouselDescription, DatePickerDescription, DateTimeInputDescription, DialogDescription, FacetFilterDescription, FormFieldDescription, HeaderDescription, ImageDescription, LabelDescription, LinkDescription, MediaControlDescription, MenubarDescription, MenuDescription, MenuDescription, NavigationBarDescription, NotificationBarDescription, PaginatorDescription, RadioGroupDescription, RatingIndicatorDescription, RoadMapDescription, RowRepeaterDescription, TableDescription, TabStripDescription, TabStripDescription, TileDescription, ToolBarDescription, TreeViewDescription, TreeViewDescription

      public class WebElementDescription
      extends WebBaseDescription

  a basic element's description.

- - ### Nested Class Summary

    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WebElementDescription.Builder` This class can be used to construct an instance of the WebElementDescription class using the builder pattern.
    `protected static class` | `WebElementDescription.Init<T extends WebElementDescription.Init<T>>`

  - ### Field Summary

    - ### Fields inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `properties`

  - ### Constructor Summary

    Modifier | Constructor and Description
    --- | ---
    `` | `WebElementDescription()` Constructs a new WebElementDescription.
    `protected` | `WebElementDescription(WebElementDescription.Init<?> init)`

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `StringProperty` | `getAccessibilityName()` Returns the label of the object (where no text label is available).
    `CSSDescription` | `getCSSSelector()` Returns the CSS Selector query used to describe the test object.
    `StringProperty` | `getRole()` Returns the object's role property.
    `XPathDescription` | `getXPath()` Returns the element's XPath used to describe the test object.
    `void` | `setAccessibilityName(java.lang.String accessibilityName)` Sets the label of the object (where no text label is available).
    `void` | `setAccessibilityName(StringProperty accessibilityName)` Sets the label of the object (where no text label is available).
    `void` | `setCSSSelector(CSSDescription cssSelector)` Sets the element's CSS Selector query.
    `void` | `setCSSSelector(java.lang.String cssSelector)` Sets the element's CSS Selector query.
    `void` | `setRole(java.lang.String role)` Sets the object's role property.
    `void` | `setRole(StringProperty role)` Sets the object's role property.
    `void` | `setXPath(java.lang.String xpath)` Sets the element's XPath.
    `void` | `setXPath(XPathDescription xpath)` Sets the element's XPath.

    - ### Methods inherited from class com.hp.lft.sdk.web.WebBaseDescription

      `cloneTo, getAbsoluteLocation, getAttributes, getClassName, getId, getInnerHTML, getInnerText, getLocation, getName, getOuterHTML, getOuterText, getSize, getStyles, getTagName, getTitle, isVisible, setAbsoluteLocation, setAbsoluteLocation, setAbsoluteLocation, setAttributes, setClassName, setClassName, setId, setId, setInnerHTML, setInnerHTML, setInnerText, setInnerText, setLocation, setLocation, setLocation, setName, setName, setOuterHTML, setOuterHTML, setOuterText, setOuterText, setSize, setSize, setSize, setStyles, setTagName, setTagName, setTitle, setTitle, setVisible`

    - ### Methods inherited from class com.hp.lft.sdk.DescriptionBase

      `getIndex, getIndexType, getVRI, setIndex, setIndexType, setVRI, setVRI`

    - ### Methods inherited from class com.hp.lft.sdk.PropertiesDescription

      `clone`

    - ### Methods inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `getValueAs, getValueAsStringProperty, insertValue`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.hp.lft.sdk.CloneableObject

      `clone`

- - ### Constructor Detail

    - #### WebElementDescription

          public WebElementDescription()

      Constructs a new WebElementDescription.

    - #### WebElementDescription

          protected WebElementDescription(WebElementDescription.Init<?> init)

  - ### Method Detail

    - #### setXPath

          public void setXPath(XPathDescription xpath)

      Sets the element's XPath.
      Parameters:
        `xpath` - the XPathDescription to be used to describe the test object.

    - #### setXPath

          public void setXPath(java.lang.String xpath)

      Sets the element's XPath.
      Parameters:
        `xpath` - the XPath to be used to describe the test object.

    - #### getXPath

          public XPathDescription getXPath()

      Returns the element's XPath used to describe the test object.
      Returns:
        the element's XPath used to describe the test object.

    - #### setCSSSelector

          public void setCSSSelector(CSSDescription cssSelector)

      Sets the element's CSS Selector query.
      Parameters:
        `cssSelector` - the CSS Selector query to be used to describe the test object.

    - #### setCSSSelector

          public void setCSSSelector(java.lang.String cssSelector)

      Sets the element's CSS Selector query.
      Parameters:
        `cssSelector` - the CSS Selector query to be used to describe the test object.

    - #### getCSSSelector

          public CSSDescription getCSSSelector()

      Returns the CSS Selector query used to describe the test object.
      Returns:
        the CSS Selector query used to describe the test object.

    - #### setRole

          public void setRole(java.lang.String role)

      Sets the object's role property.
      Parameters:
        `role` - the object's role property.

    - #### setRole

          public void setRole(StringProperty role)

      Sets the object's role property.
      Parameters:
        `role` - a StringProperty (or RegExpProperty) representing the object's role property.

    - #### getRole

          public StringProperty getRole()

      Returns the object's role property.
      Returns:
        the object's role property.

    - #### setAccessibilityName

          public void setAccessibilityName(StringProperty accessibilityName)

      Sets the label of the object (where no text label is available).
      Parameters:
        `accessibilityName` - a StringProperty (or RegExpProperty) representing the label of the object (where no text label is available).

    - #### setAccessibilityName

          public void setAccessibilityName(java.lang.String accessibilityName)

      Sets the label of the object (where no text label is available).
      Parameters:
        `accessibilityName` - the label of the object (where no text label is available).

    - #### getAccessibilityName

          public StringProperty getAccessibilityName()

      Returns the label of the object (where no text label is available).
      Returns:
        the label of the object (where no text label is available).