Open topic with navigation

com.hp.lft.sdk.web

## Class BrowserDescription

- java.lang.Object
- - com.hp.lft.sdk.internal.PropertiesDescriptionBase
  - - com.hp.lft.sdk.PropertiesDescription
    - - com.hp.lft.sdk.web.BrowserDescription

- All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.MapHolder, java.lang.Cloneable

      public class BrowserDescription
      extends PropertiesDescription
      implements com.hp.lft.sdk.internal.MapHolder

  The description of a Web Browser test object.

- - ### Nested Class Summary

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

  - ### Field Summary

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

      `properties`

  - ### Constructor Summary

    Constructor and Description
    `BrowserDescription()` Initializes a new instance of the BrowserDescription class.

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `cloneTo(java.lang.Object clonedObject)`
    `static BrowserDescription` | `fromMap(java.util.Map<java.lang.String,java.lang.Object> props)` This method creates a new instance of `BrowserDescription` and initializes it with the given props map.
    `java.lang.Object` | `get(java.lang.String capability)` Returns the current value of a `BrowserDescription` capability.
    `java.lang.String` | `getBrowserTypeAsString()` Returns the String value representation of Type.
    `java.util.Map<java.lang.String,java.lang.Object>` | `getMap()` For internal use only.
    `StringProperty` | `getOpenTitle()` Returns the browser's initial title when first opened.
    `StringProperty` | `getOpenUrl()` Returns the URL from which the browser is first opened.
    `StringProperty` | `getTitle()` Returns the browser's title.
    `BrowserType` | `getType()` Returns the type of the Browser.
    `StringProperty` | `getUrl()` Returns the current URL of the browser tab.
    `void` | `set(java.lang.String capability, java.lang.Object value)` Sets a `BrowserDescription` capability to the given value.
    `void` | `setOpenTitle(java.lang.String openTitle)` Sets the browser's initial title when first opened.
    `void` | `setOpenTitle(StringProperty openTitle)` Sets the browser's initial title when first opened.
    `void` | `setOpenUrl(java.lang.String openURL)` Sets the URL from which the browser is first opened.
    `void` | `setOpenUrl(StringProperty openURL)` Sets the URL from which the browser is first opened.
    `void` | `setTitle(java.lang.String title)` Sets the browser's title.
    `void` | `setTitle(StringProperty title)` Sets the browser's title.
    `void` | `setType(BrowserType type)` Sets the type of the Browser.
    `void` | `setType(java.lang.String type)` Sets the wanted type of browser for launching.
    `void` | `setUrl(java.lang.String url)` Sets the current URL of the browser tab.
    `void` | `setUrl(StringProperty url)` Sets the current URL of the browser tab.

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

- - ### Constructor Detail

    - #### BrowserDescription

          public BrowserDescription()

      Initializes a new instance of the BrowserDescription class.

  - ### Method Detail

    - #### fromMap

          public static BrowserDescription fromMap(java.util.Map<java.lang.String,java.lang.Object> props)
                                            throws GeneralLeanFtException

      This method creates a new instance of `BrowserDescription` and initializes it with the given props map.
      Parameters:
        `props` - a `Map` of properties to initialize the `BrowserDescription` with.
      Returns:
        a new instance of `BrowserDescription` initialized with the given props map.
      Throws:
        `GeneralLeanFtException`

    - #### setOpenTitle

          public void setOpenTitle(StringProperty openTitle)

      Sets the browser's initial title when first opened.
      Parameters:
        `openTitle` - a StringProperty(or RegExpProperty) representing the browser's initial title when first opened.

    - #### setOpenTitle

          public void setOpenTitle(java.lang.String openTitle)

      Sets the browser's initial title when first opened.
      Parameters:
        `openTitle` - the browser's initial title when first opened.

    - #### getOpenTitle

          public StringProperty getOpenTitle()

      Returns the browser's initial title when first opened.
      Returns:
        the browser's initial title when first opened.

    - #### setOpenUrl

          public void setOpenUrl(StringProperty openURL)

      Sets the URL from which the browser is first opened.
      Parameters:
        `openURL` - a StringProperty(or RegExpProperty) representing the URL from which the browser is first opened.

    - #### setOpenUrl

          public void setOpenUrl(java.lang.String openURL)

      Sets the URL from which the browser is first opened.
      Parameters:
        `openURL` - the URL from which the browser is first opened.

    - #### getOpenUrl

          public StringProperty getOpenUrl()

      Returns the URL from which the browser is first opened.
      Returns:
        the URL from which the browser is first opened.

    - #### setUrl

          public void setUrl(StringProperty url)

      Sets the current URL of the browser tab.
      Parameters:
        `url` - a StringProperty(or RegExpProperty) representing the current URL of the browser tab.

    - #### setUrl

          public void setUrl(java.lang.String url)

      Sets the current URL of the browser tab.
      Parameters:
        `url` - the current URL of the browser tab.

    - #### getUrl

          public StringProperty getUrl()

      Returns the current URL of the browser tab.
      Returns:
        the current URL of the browser tab.

    - #### setTitle

          public void setTitle(StringProperty title)

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

    - #### setTitle

          public void setTitle(java.lang.String title)

      Sets the browser's title.
      Parameters:
        `title` - the browser's title.

    - #### getTitle

          public StringProperty getTitle()

      Returns the browser's title.
      Returns:
        the browser's title.

    - #### setType

          public void setType(BrowserType type)

      Sets the type of the Browser.
      Parameters:
        `type` - the type of the Browser.

    - #### setType

          public void setType(java.lang.String type)

      Sets the wanted type of browser for launching.
      Parameters:
        `type` - the wanted type of browser for launching.

    - #### getType

          public BrowserType getType()

      Returns the type of the Browser.
      Returns:
        the type of the Browser.

    - #### set

          public void set(java.lang.String capability,
                          java.lang.Object value)
                   throws GeneralLeanFtException

      Sets a `BrowserDescription` capability to the given value.
      Parameters:
        `capability` - the name of the capability to set value for.
        `value` - the new value of the capability.
      Throws:
        `GeneralLeanFtException` - if the set operation fails.

    - #### get

          public java.lang.Object get(java.lang.String capability)
                               throws GeneralLeanFtException

      Returns the current value of a `BrowserDescription` capability.
      Parameters:
        `capability` - the capability to return the stored value of.
      Returns:
        the current value of a `BrowserDescription` capability.
      Throws:
        `GeneralLeanFtException` - if the get operation fails.

    - #### getMap

          public java.util.Map<java.lang.String,java.lang.Object> getMap()

      For internal use only.
      Specified by:
        `getMap` in interface `com.hp.lft.sdk.internal.MapHolder`
      Returns:
        for internal use only.

    - #### getBrowserTypeAsString

          public java.lang.String getBrowserTypeAsString()

      Returns the String value representation of Type.
      Returns:
        the String value representation of Type.

    - #### cloneTo

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

      Overrides:
        `cloneTo` in class `com.hp.lft.sdk.internal.PropertiesDescriptionBase`
      Throws:
        `java.lang.CloneNotSupportedException`