Open topic with navigation

com.hp.lft.sdk.web

## Class WebBaseDescription

- 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

- All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, java.lang.Cloneable
  Direct Known Subclasses:
    FrameDescription, WebElementDescription

      public abstract class WebBaseDescription
      extends DescriptionBase

  A basic Web-based content description.

- - ### Nested Class Summary

    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `WebBaseDescription.Init<T extends WebBaseDescription.Init<T>>` Helper class for derived Builder classes.

    - ### Nested classes/interfaces inherited from class com.hp.lft.sdk.DescriptionBase

      `DescriptionBase.Builder`

  - ### Field Summary

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

      `properties`

  - ### Constructor Summary

    Modifier | Constructor and Description
    --- | ---
    `` | `WebBaseDescription()`
    `protected` | `WebBaseDescription(WebBaseDescription.Init<?> init)` Initializes a new instance of the WebBaseDescription class using the Builder pattern.

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `cloneTo(java.lang.Object clonedObject)` Creates an exact copy of the test object with its description.
    `LocationProperty` | `getAbsoluteLocation()` Returns the object's absolute coordinates relative to the screen (in pixels).
    `java.util.Map<java.lang.String,StringProperty>` | `getAttributes()` Returns the test object's DOM attributes.
    `StringProperty` | `getClassName()` Returns the object's CSS class.
    `StringProperty` | `getId()` Returns the object's HTML identifier.
    `StringProperty` | `getInnerHTML()` Returns the HTML code contained between the object's start and end tags.
    `StringProperty` | `getInnerText()` Returns the text contained between the object's start and end tags.
    `LocationProperty` | `getLocation()` Returns the object's coordinates relative to the parent window (in pixels).
    `StringProperty` | `getName()` Returns the object's name property.
    `StringProperty` | `getOuterHTML()` Returns the HTML code contained between the object's start and end tags.
    `StringProperty` | `getOuterText()` Returns the object's text.
    `SizeProperty` | `getSize()` Returns the test object's size (in pixels).
    `java.util.Map<java.lang.String,StringProperty>` | `getStyles()` Returns the computed style used to describe the test object.
    `StringProperty` | `getTagName()` Returns the element's tag name.
    `StringProperty` | `getTitle()` Returns the object's title attribute.
    `java.lang.Boolean` | `isVisible()` Indicates whether the current object is visible.
    `void` | `setAbsoluteLocation(java.lang.Integer absX, java.lang.Integer absY)` Sets the object's absolute coordinates relative to the screen (in pixels).
    `void` | `setAbsoluteLocation(LocationProperty absLocation)` Sets the object's absolute coordinates relative to the screen (in pixels).
    `void` | `setAbsoluteLocation(java.awt.Point absLocation)` Sets the object's absolute coordinates relative to the screen (in pixels).
    `void` | `setAttributes(java.util.Map<java.lang.String,StringProperty> attributes)` Sets the test object's DOM attributes.
    `void` | `setClassName(java.lang.String className)` Sets the object's CSS class.
    `void` | `setClassName(StringProperty className)` Sets the object's CSS class.
    `void` | `setId(java.lang.String id)` Sets the element's HTML id.
    `void` | `setId(StringProperty id)` Sets the element's HTML id.
    `void` | `setInnerHTML(java.lang.String innerHTML)` Sets the HTML code contained between the object's start and end tags.
    `void` | `setInnerHTML(StringProperty innerHTML)` Sets the HTML code contained between the object's start and end tags.
    `void` | `setInnerText(java.lang.String innerText)` Sets the text contained between the object's start and end tags.
    `void` | `setInnerText(StringProperty innerText)` Sets the text contained between the object's start and end tags.
    `void` | `setLocation(java.lang.Integer x, java.lang.Integer y)` Sets the object's coordinates relative to the parent window (in pixels).
    `void` | `setLocation(LocationProperty location)` Sets the object's coordinates relative to the parent window (in pixels).
    `void` | `setLocation(java.awt.Point location)` Sets the object's coordinates relative to the parent window (in pixels).
    `void` | `setName(java.lang.String name)` Sets the object's name property.
    `void` | `setName(StringProperty name)` Sets the object's name property.
    `void` | `setOuterHTML(java.lang.String outerHTML)` Sets the HTML code contained between the object's start and end tags.
    `void` | `setOuterHTML(StringProperty outerHTML)` Sets the HTML code contained between the object's start and end tags.
    `void` | `setOuterText(java.lang.String outerText)` Sets the object's text.
    `void` | `setOuterText(StringProperty outerText)` Sets the object's text.
    `void` | `setSize(java.awt.Dimension size)` Sets the test object's size (in pixels).
    `void` | `setSize(java.lang.Integer width, java.lang.Integer height)` Sets the test object's size (in pixels).
    `void` | `setSize(SizeProperty size)` Sets the test object's size (in pixels).
    `void` | `setStyles(java.util.Map<java.lang.String,StringProperty> styles)` Sets the test object's computed style. Note: this property is not relevant when run against Internet Explorer 8 or when the document mode of another Internet Explorer version is set to Internet 8 or earlier.
    `void` | `setTagName(java.lang.String tagName)` Sets the element's tag name.
    `void` | `setTagName(StringProperty tagName)` the element's tag name.
    `void` | `setTitle(java.lang.String title)` Sets the object's title attribute.
    `void` | `setTitle(StringProperty title)` Sets the object's title attribute.
    `void` | `setVisible(java.lang.Boolean isVisible)` Sets whether the object is visible.

    - ### 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

    - #### WebBaseDescription

          public WebBaseDescription()

    - #### WebBaseDescription

          protected WebBaseDescription(WebBaseDescription.Init<?> init)

      Initializes a new instance of the WebBaseDescription class using the Builder pattern.
      Parameters:
        `init` - the Builder pattern.

  - ### Method Detail

    - #### cloneTo

          protected void cloneTo(java.lang.Object clonedObject)
                          throws java.lang.CloneNotSupportedException

      Description copied from class: `DescriptionBase`
      Creates an exact copy of the test object with its description.
      Overrides:
        `cloneTo` in class `DescriptionBase`
      Throws:
        `java.lang.CloneNotSupportedException`

    - #### setTagName

          public void setTagName(java.lang.String tagName)

      Sets the element's tag name.
      Parameters:
        `tagName` - the element's tag name.

    - #### setTagName

          public void setTagName(StringProperty tagName)

      the element's tag name.
      Parameters:
        `tagName` - a StringProperty(or RegExpProperty) representing the element's tag name.

    - #### getTagName

          public StringProperty getTagName()

      Returns the element's tag name.
      Returns:
        the element's tag name.

    - #### setId

          public void setId(java.lang.String id)

      Sets the element's HTML id.
      Parameters:
        `id` - the element's HTML id.

    - #### setId

          public void setId(StringProperty id)

      Sets the element's HTML id.
      Parameters:
        `id` - a StringProperty(or RegExpProperty) representing the element's HTML id.

    - #### getId

          public StringProperty getId()

      Returns the object's HTML identifier.
      Returns:
        the object's HTML identifier.

    - #### setClassName

          public void setClassName(java.lang.String className)

      Sets the object's CSS class.
      Parameters:
        `className` - the object's CSS class.

    - #### setClassName

          public void setClassName(StringProperty className)

      Sets the object's CSS class.
      Parameters:
        `className` - a StringProperty(or RegExpProperty) representing the object's CSS class.

    - #### getClassName

          public StringProperty getClassName()

      Returns the object's CSS class.
      Returns:
        the object's CSS class.

    - #### setInnerHTML

          public void setInnerHTML(java.lang.String innerHTML)

      Sets the HTML code contained between the object's start and end tags.
      Parameters:
        `innerHTML` - the HTML code contained between the object's start and end tags.

    - #### setInnerHTML

          public void setInnerHTML(StringProperty innerHTML)

      Sets the HTML code contained between the object's start and end tags.
      Parameters:
        `innerHTML` - a StringProperty(or RegExpProperty) representing the HTML code contained between the object's start and end tags.

    - #### getInnerHTML

          public StringProperty getInnerHTML()

      Returns the HTML code contained between the object's start and end tags.
      Returns:
        the HTML code contained between the object's start and end tags.

    - #### setOuterHTML

          public void setOuterHTML(java.lang.String outerHTML)

      Sets the HTML code contained between the object's start and end tags.
      Parameters:
        `outerHTML` - the HTML code contained between the object's start and end tags.

    - #### setOuterHTML

          public void setOuterHTML(StringProperty outerHTML)

      Sets the HTML code contained between the object's start and end tags.
      Parameters:
        `outerHTML` - a StringProperty(or RegExpProperty) representing the HTML code contained between the object's start and end tags.

    - #### getOuterHTML

          public StringProperty getOuterHTML()

      Returns the HTML code contained between the object's start and end tags.
      Returns:
        the HTML code contained between the object's start and end tags.

    - #### setInnerText

          public void setInnerText(java.lang.String innerText)

      Sets the text contained between the object's start and end tags.
      Parameters:
        `innerText` - the text contained between the object's start and end tags.

    - #### setInnerText

          public void setInnerText(StringProperty innerText)

      Sets the text contained between the object's start and end tags.
      Parameters:
        `innerText` - a StringProperty(or RegExpProperty) representing the text contained between the object's start and end tags.

    - #### getInnerText

          public StringProperty getInnerText()

      Returns the text contained between the object's start and end tags.
      Returns:
        the text contained between the object's start and end tags.

    - #### setOuterText

          public void setOuterText(java.lang.String outerText)

      Sets the object's text.
      Supported in Internet Explorer only.
      Parameters:
        `outerText` - the element's text (including all sub elements) with the element's wrapping text.

    - #### setOuterText

          public void setOuterText(StringProperty outerText)

      Sets the object's text.
      Supported in Internet Explorer only.
      Parameters:
        `outerText` - a StringProperty(or RegExpProperty) representing the object's text.

    - #### getOuterText

          public StringProperty getOuterText()

      Returns the object's text.
      Supported in Internet Explorer only.
      Returns:
        the object's text.

    - #### setName

          public void setName(java.lang.String name)

      Sets the object's name property.
      Parameters:
        `name` - the element's name property.

    - #### setName

          public void setName(StringProperty name)

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

    - #### getName

          public StringProperty getName()

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

    - #### setTitle

          public void setTitle(java.lang.String title)

      Sets the object's title attribute.
      Parameters:
        `title` - the object's title attribute.

    - #### setTitle

          public void setTitle(StringProperty title)

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

    - #### getTitle

          public StringProperty getTitle()

      Returns the object's title attribute.
      Returns:
        the object's title attribute.

    - #### setVisible

          public void setVisible(java.lang.Boolean isVisible)

      Sets whether the object is visible.
      Parameters:
        `isVisible` - the visibility state of the test object.

    - #### isVisible

          public java.lang.Boolean isVisible()

      Indicates whether the current object is visible.
      Returns:
        true, if the current object is visible.

    - #### setLocation

          public void setLocation(LocationProperty location)

      Sets the object's coordinates relative to the parent window (in pixels).
      Parameters:
        `location` - a LocationProperty representing the object's coordinates relative to the parent window (in pixels).

    - #### setLocation

          public void setLocation(java.lang.Integer x,
                                  java.lang.Integer y)

      Sets the object's coordinates relative to the parent window (in pixels).
      Parameters:
        `x` - the X coordinate of the test object location.
        `y` - the Y coordinate of the test object location.

    - #### setLocation

          public void setLocation(java.awt.Point location)

      Sets the object's coordinates relative to the parent window (in pixels).
      Parameters:
        `location` - a Point representing the object's coordinates relative to the parent window (in pixels).

    - #### getLocation

          public LocationProperty getLocation()

      Returns the object's coordinates relative to the parent window (in pixels).
      Returns:
        the object's coordinates relative to the parent window (in pixels).

    - #### setAbsoluteLocation

          public void setAbsoluteLocation(LocationProperty absLocation)

      Sets the object's absolute coordinates relative to the screen (in pixels).
      0,0 is always the top-left corner of the (primary) monitor.
      Parameters:
        `absLocation` - a LocationProperty representing the object's absolute coordinates relative to the screen (in pixels).

    - #### setAbsoluteLocation

          public void setAbsoluteLocation(java.lang.Integer absX,
                                          java.lang.Integer absY)

      Sets the object's absolute coordinates relative to the screen (in pixels).
      0,0 is always the top-left corner of the (primary) monitor.
      Parameters:
        `absX` - the absolute X coordinate of the test object location.
        `absY` - the absolute Y coordinate of the test object location.

    - #### setAbsoluteLocation

          public void setAbsoluteLocation(java.awt.Point absLocation)

      Sets the object's absolute coordinates relative to the screen (in pixels).
      0,0 is always the top-left corner of the (primary) monitor.
      Parameters:
        `absLocation` - a Point representing the object's absolute coordinates relative to the screen (in pixels).

    - #### getAbsoluteLocation

          public LocationProperty getAbsoluteLocation()

      Returns the object's absolute coordinates relative to the screen (in pixels).
      0,0 is always the top-left corner of the (primary) monitor.
      Returns:
        the object's absolute coordinates relative to the screen (in pixels).

    - #### setAttributes

          public void setAttributes(java.util.Map<java.lang.String,StringProperty> attributes)

      Sets the test object's DOM attributes.
      Parameters:
        `attributes` - the attributes used to describe the test object.

    - #### getAttributes

          public java.util.Map<java.lang.String,StringProperty> getAttributes()

      Returns the test object's DOM attributes.
      Returns:
        the attributes used to describe the test object.

    - #### setStyles

          public void setStyles(java.util.Map<java.lang.String,StringProperty> styles)

      Sets the test object's computed style.
      Note: this property is not relevant when run against Internet Explorer 8 or when the document mode of another Internet Explorer version is set to Internet 8 or earlier.
      Parameters:
        `styles` - the computed styles to describe the test object.

    - #### getStyles

          public java.util.Map<java.lang.String,StringProperty> getStyles()

      Returns the computed style used to describe the test object.
      Returns:
        the computed style used to describe the test object.

    - #### setSize

          public void setSize(SizeProperty size)

      Sets the test object's size (in pixels).
      Parameters:
        `size` - the test object's size (in pixels).

    - #### setSize

          public void setSize(java.awt.Dimension size)

      Sets the test object's size (in pixels).
      Parameters:
        `size` - the test object's size (in pixels).

    - #### setSize

          public void setSize(java.lang.Integer width,
                              java.lang.Integer height)

      Sets the test object's size (in pixels).
      Parameters:
        `width` - the width of the test object (in pixels).
        `height` - the height of the test object (in pixels).

    - #### getSize

          public SizeProperty getSize()

      Returns the test object's size (in pixels).
      Returns:
        the test object's size (in pixels).