Package 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
,Cloneable
public class BrowserDescription
extends PropertiesDescription
implements com.hp.lft.sdk.internal.MapHolder
The description of a Web Browser test object.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
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
ConstructorsConstructorDescriptionInitializes a new instance of the BrowserDescription class. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
static BrowserDescription
This method creates a new instance ofBrowserDescription
and initializes it with the given props map.Returns the current value of aBrowserDescription
capability.Returns the String value representation of Type.getMap()
For internal use only.Returns the browser's initial title when first opened.Returns the URL from which the browser is first opened.getTitle()
Returns the browser's title.getType()
Returns the type of the Browser.getUrl()
Returns the current URL of the browser tab.void
Sets aBrowserDescription
capability to the given value.void
setOpenTitle
(StringProperty openTitle) Sets the browser's initial title when first opened.void
setOpenTitle
(String openTitle) Sets the browser's initial title when first opened.void
setOpenUrl
(StringProperty openURL) Sets the URL from which the browser is first opened.void
setOpenUrl
(String openURL) Sets the URL from which the browser is first opened.void
setTitle
(StringProperty title) Sets the browser's title.void
Sets the browser's title.void
setType
(BrowserType type) Sets the type of the Browser.void
Sets the wanted type of browser for launching.void
setUrl
(StringProperty url) Sets the current URL of the browser tab.void
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
-
Constructor Details
-
BrowserDescription
public BrowserDescription()Initializes a new instance of the BrowserDescription class.
-
-
Method Details
-
fromMap
This method creates a new instance ofBrowserDescription
and initializes it with the given props map.- Parameters:
props
- aMap
of properties to initialize theBrowserDescription
with.- Returns:
- a new instance of
BrowserDescription
initialized with the given props map. - Throws:
GeneralLeanFtException
- if error occurs during execution.
-
setOpenTitle
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
Sets the browser's initial title when first opened.- Parameters:
openTitle
- the browser's initial title when first opened.
-
getOpenTitle
Returns the browser's initial title when first opened.- Returns:
- the browser's initial title when first opened.
-
setOpenUrl
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
Sets the URL from which the browser is first opened.- Parameters:
openURL
- the URL from which the browser is first opened.
-
getOpenUrl
Returns the URL from which the browser is first opened.- Returns:
- the URL from which the browser is first opened.
-
setUrl
Sets the current URL of the browser tab.- Parameters:
url
- a StringProperty(or RegExpProperty) representing the current URL of the browser tab.
-
setUrl
Sets the current URL of the browser tab.- Parameters:
url
- the current URL of the browser tab.
-
getUrl
Returns the current URL of the browser tab.- Returns:
- the current URL of the browser tab.
-
setTitle
Sets the browser's title.- Parameters:
title
- a StringProperty(or RegExpProperty) representing the browser's title.
-
setTitle
Sets the browser's title.- Parameters:
title
- the browser's title.
-
getTitle
Returns the browser's title.- Returns:
- the browser's title.
-
setType
Sets the type of the Browser.- Parameters:
type
- the type of the Browser.
-
setType
Sets the wanted type of browser for launching.- Parameters:
type
- the wanted type of browser for launching.
-
getType
Returns the type of the Browser.- Returns:
- the type of the Browser.
-
set
Sets aBrowserDescription
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
Returns the current value of aBrowserDescription
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
For internal use only.- Specified by:
getMap
in interfacecom.hp.lft.sdk.internal.MapHolder
- Returns:
- for internal use only.
-
getBrowserTypeAsString
Returns the String value representation of Type.- Returns:
- the String value representation of Type.
-
cloneTo
- Overrides:
cloneTo
in classcom.hp.lft.sdk.internal.PropertiesDescriptionBase
- Throws:
CloneNotSupportedException
-