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, Cloneable

public class BrowserDescription extends PropertiesDescription implements com.hp.lft.sdk.internal.MapHolder
The description of a Web Browser test object.
  • Constructor Details

    • BrowserDescription

      public BrowserDescription()
      Initializes a new instance of the BrowserDescription class.
  • Method Details

    • fromMap

      public static BrowserDescription fromMap(Map<String,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 - if error occurs during execution.
    • 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(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(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(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(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(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(String capability, 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 Object get(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 Map<String,Object> getMap()
      For internal use only.
      Specified by:
      getMap in interface com.hp.lft.sdk.internal.MapHolder
      Returns:
      for internal use only.
    • getBrowserTypeAsString

      public String getBrowserTypeAsString()
      Returns the String value representation of Type.
      Returns:
      the String value representation of Type.
    • cloneTo

      protected void cloneTo(Object clonedObject) throws CloneNotSupportedException
      Overrides:
      cloneTo in class com.hp.lft.sdk.internal.PropertiesDescriptionBase
      Throws:
      CloneNotSupportedException