Package 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
,Cloneable
- Direct Known Subclasses:
FrameDescription
,WebElementDescription
A basic Web-based content description.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected 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
ConstructorsModifierConstructorDescriptionprotected
Initializes a new instance of the WebBaseDescription class using the Builder pattern. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Creates an exact copy of the test object with its description.Returns the object's absolute coordinates relative to the screen (in pixels).Returns the test object's DOM attributes.Returns the object's CSS class.getId()
Returns the object's HTML identifier.Returns the HTML code contained between the object's start and end tags.Returns the text contained between the object's start and end tags.Returns the object's coordinates relative to the parent window (in pixels).getName()
Returns the object's name property.Returns the HTML code contained between the object's start and end tags.Returns the object's text.getSize()
Returns the test object's size (in pixels).Returns the computed style used to describe the test object.Returns the element's tag name.getTitle()
Returns the object's title attribute.Indicates whether the current object is visible.void
setAbsoluteLocation
(LocationProperty absLocation) Sets the object's absolute coordinates relative to the screen (in pixels).void
setAbsoluteLocation
(Point absLocation) Sets the object's absolute coordinates relative to the screen (in pixels).void
setAbsoluteLocation
(Integer absX, Integer absY) Sets the object's absolute coordinates relative to the screen (in pixels).void
setAttributes
(Map<String, StringProperty> attributes) Sets the test object's DOM attributes.void
setClassName
(StringProperty className) Sets the object's CSS class.void
setClassName
(String className) Sets the object's CSS class.void
setId
(StringProperty id) Sets the element's HTML id.void
Sets the element's HTML id.void
setInnerHTML
(StringProperty innerHTML) Sets the HTML code contained between the object's start and end tags.void
setInnerHTML
(String innerHTML) Sets the HTML code 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
setInnerText
(String innerText) Sets the text contained between the object's start and end tags.void
setLocation
(LocationProperty location) Sets the object's coordinates relative to the parent window (in pixels).void
setLocation
(Point location) Sets the object's coordinates relative to the parent window (in pixels).void
setLocation
(Integer x, Integer y) Sets the object's coordinates relative to the parent window (in pixels).void
setName
(StringProperty name) Sets the object's name property.void
Sets the object's name property.void
setOuterHTML
(StringProperty outerHTML) Sets the HTML code contained between the object's start and end tags.void
setOuterHTML
(String outerHTML) Sets the HTML code contained between the object's start and end tags.void
setOuterText
(StringProperty outerText) Sets the object's text.void
setOuterText
(String outerText) Sets the object's text.void
setSize
(SizeProperty size) Sets the test object's size (in pixels).void
Sets the test object's size (in pixels).void
Sets the test object's size (in pixels).void
setStyles
(Map<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
(StringProperty tagName) the element's tag name.void
setTagName
(String tagName) Sets the element's tag name.void
setTitle
(StringProperty title) Sets the object's title attribute.void
Sets the object's title attribute.void
setVisible
(Boolean isVisible) Sets whether the object is visible.Methods inherited from class com.hp.lft.sdk.DescriptionBase
getIndex, getIndexType, getObjectProperties, getVRI, setIndex, setIndexType, setObjectProperties, 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 Details
-
WebBaseDescription
public WebBaseDescription() -
WebBaseDescription
Initializes a new instance of the WebBaseDescription class using the Builder pattern.- Parameters:
init
- the Builder pattern.
-
-
Method Details
-
cloneTo
Description copied from class:DescriptionBase
Creates an exact copy of the test object with its description.- Overrides:
cloneTo
in classDescriptionBase
- Throws:
CloneNotSupportedException
-
setTagName
Sets the element's tag name.- Parameters:
tagName
- the element's tag name.
-
setTagName
the element's tag name.- Parameters:
tagName
- a StringProperty(or RegExpProperty) representing the element's tag name.
-
getTagName
Returns the element's tag name.- Returns:
- the element's tag name.
-
setId
Sets the element's HTML id.- Parameters:
id
- the element's HTML id.
-
setId
Sets the element's HTML id.- Parameters:
id
- a StringProperty(or RegExpProperty) representing the element's HTML id.
-
getId
Returns the object's HTML identifier.- Returns:
- the object's HTML identifier.
-
setClassName
Sets the object's CSS class.- Parameters:
className
- the object's CSS class.
-
setClassName
Sets the object's CSS class.- Parameters:
className
- a StringProperty(or RegExpProperty) representing the object's CSS class.
-
getClassName
Returns the object's CSS class.- Returns:
- the object's CSS class.
-
setInnerHTML
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
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
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
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
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
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
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
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
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
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
Sets the object's text.
Supported in Internet Explorer only.- Parameters:
outerText
- a StringProperty(or RegExpProperty) representing the object's text.
-
getOuterText
Returns the object's text.
Supported in Internet Explorer only.- Returns:
- the object's text.
-
setName
Sets the object's name property.- Parameters:
name
- the element's name property.
-
setName
Sets the object's name property.- Parameters:
name
- a StringProperty(or RegExpProperty) representing the element's name property.
-
getName
Returns the object's name property.- Returns:
- the object's name property.
-
setTitle
Sets the object's title attribute.- Parameters:
title
- the object's title attribute.
-
setTitle
Sets the object's title attribute.- Parameters:
title
- a StringProperty(or RegExpProperty) representing the object's title attribute.
-
getTitle
Returns the object's title attribute.- Returns:
- the object's title attribute.
-
setVisible
Sets whether the object is visible.- Parameters:
isVisible
- the visibility state of the test object.
-
isVisible
Indicates whether the current object is visible.- Returns:
- true, if the current object is visible.
-
setLocation
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
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
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
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
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
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
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
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
Sets the test object's DOM attributes.- Parameters:
attributes
- the attributes used to describe the test object.
-
getAttributes
Returns the test object's DOM attributes.- Returns:
- the attributes used to describe the test object.
-
setStyles
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
Returns the computed style used to describe the test object.- Returns:
- the computed style used to describe the test object.
-
setSize
Sets the test object's size (in pixels).- Parameters:
size
- the test object's size (in pixels).
-
setSize
Sets the test object's size (in pixels).- Parameters:
size
- the test object's size (in pixels).
-
setSize
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
Returns the test object's size (in pixels).- Returns:
- the test object's size (in pixels).
-