Package com.hp.lft.sdk.web
Class MediaControlDescription
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
com.hp.lft.sdk.web.WebElementDescription
com.hp.lft.sdk.web.MediaControlDescription
- All Implemented Interfaces:
CloneableObject
,Description
,com.hp.lft.sdk.internal.DescriptionWithVri
,Cloneable
- Direct Known Subclasses:
AudioControlDescription
,VideoControlDescription
The description of a Web MediaControl (audio control or video control) test object.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Helper class for derived Builder classes.Nested classes/interfaces inherited from class com.hp.lft.sdk.web.WebElementDescription
WebElementDescription.Builder
-
Field Summary
Fields inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase
properties
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Initializes a new instance of the MediaControlDescription class.protected
Initializes a new instance of the MediaControlDescription class using the Builder pattern. -
Method Summary
Modifier and TypeMethodDescriptionReturns the URL of the media file currently selected in the browser window.Returns the length of the currently selected media file (in milliseconds).Returns the speed of the media playback.Returns the current playback position in the media file (in milliseconds).String[]
Returns the list of all media file source URLs.Returns the volume used when playing the media file.Indicates whether the media file starts playing as soon as it loads.Indicates whether the media player should display playback controls.isMuted()
Indicates whether the media volume is muted.Indicates whether the media is currently playing.Indicates whether the media file should start playing again from the beginning as soon as it finishes playing.void
setAutoPlay
(Boolean hasAutoPlay) Sets whether the media file starts playing as soon as it loads.void
setCurrentSource
(StringProperty currentSource) Sets the URL of the media file currently selected in the browser window.void
setCurrentSource
(String currentSource) Sets the URL of the media file currently selected in the browser window.void
setDuration
(Integer duration) Sets the length of the currently selected media file (in milliseconds).void
Sets whether the media volume is muted.void
setPlaybackControls
(Boolean hasPlaybackControls) Sets whether the media player should display playback controls.void
setPlaybackRate
(Double playbackRate) Sets the speed of the media playback.void
setPlaybackTime
(Integer playbackTime) Sets the current playback position in the media file (in milliseconds).void
setPlaying
(Boolean isPlaying) Sets whether the media is currently playing.void
setPlayInLoop
(Boolean isPlayInLoop) Sets whether the media file should start playing again from the beginning as soon as it finishes playing.void
setSources
(String[] sources) Sets the list of all media file source URLs.void
Sets the volume used when playing the media file.Methods inherited from class com.hp.lft.sdk.web.WebElementDescription
getAccessibilityName, getCSSSelector, getRole, getXPath, setAccessibilityName, setAccessibilityName, setCSSSelector, setCSSSelector, setRole, setRole, setXPath, setXPath
Methods inherited from class com.hp.lft.sdk.web.WebBaseDescription
cloneTo, getAbsoluteLocation, getAttributes, getClassName, getId, getInnerHTML, getInnerText, getLocation, getName, getOuterHTML, getOuterText, getSize, getStyles, getTagName, getTitle, isVisible, setAbsoluteLocation, setAbsoluteLocation, setAbsoluteLocation, setAttributes, setClassName, setClassName, setId, setId, setInnerHTML, setInnerHTML, setInnerText, setInnerText, setLocation, setLocation, setLocation, setName, setName, setOuterHTML, setOuterHTML, setOuterText, setOuterText, setSize, setSize, setSize, setStyles, setTagName, setTagName, setTitle, setTitle, setVisible
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
-
MediaControlDescription
Initializes a new instance of the MediaControlDescription class using the Builder pattern.- Parameters:
init
- the Builder pattern.
-
MediaControlDescription
protected MediaControlDescription()Initializes a new instance of the MediaControlDescription class.
-
-
Method Details
-
setAutoPlay
Sets whether the media file starts playing as soon as it loads.- Parameters:
hasAutoPlay
- true if the media file starts playing as soon as it loads.
-
hasAutoPlay
Indicates whether the media file starts playing as soon as it loads.- Returns:
- true, if the media file starts playing as soon as it loads.
-
setPlaybackControls
Sets whether the media player should display playback controls.- Parameters:
hasPlaybackControls
- true, if the media player should display playback controls.
-
hasPlaybackControls
Indicates whether the media player should display playback controls.- Returns:
- true, if the media player should display playback controls.
-
setCurrentSource
Sets the URL of the media file currently selected in the browser window.- Parameters:
currentSource
- a StringProperty(or RegExpProperty) representing the URL of the media file currently selected in the browser window.
-
setCurrentSource
Sets the URL of the media file currently selected in the browser window.- Parameters:
currentSource
- the URL of the media file currently selected in the browser window.
-
getCurrentSource
Returns the URL of the media file currently selected in the browser window.- Returns:
- the URL of the media file currently selected in the browser window.
-
setPlayInLoop
Sets whether the media file should start playing again from the beginning as soon as it finishes playing.- Parameters:
isPlayInLoop
- true, if the media file should start playing again from the beginning as soon as it finishes playing.
-
isPlayInLoop
Indicates whether the media file should start playing again from the beginning as soon as it finishes playing.- Returns:
- true, if the media file should start playing again from the beginning as soon as it finishes playing.
-
setMuted
Sets whether the media volume is muted.- Parameters:
isMuted
- true, if the media volume is muted.
-
isMuted
Indicates whether the media volume is muted.- Returns:
- true, if the media volume is muted.
-
setPlaybackRate
Sets the speed of the media playback. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.- Parameters:
playbackRate
- the speed of the media playback. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.
-
getPlaybackRate
Returns the speed of the media playback. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.- Returns:
- the speed of the media playback. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.
-
setPlaying
Sets whether the media is currently playing.- Parameters:
isPlaying
- true, if the media is currently playing.
-
isPlaying
Indicates whether the media is currently playing.- Returns:
- true, if the media is currently playing.
-
setVolume
Sets the volume used when playing the media file. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.- Parameters:
volume
- the volume used when playing the media file. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.
-
getVolume
Returns the volume used when playing the media file. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.- Returns:
- the volume used when playing the media file. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.
-
setDuration
Sets the length of the currently selected media file (in milliseconds).- Parameters:
duration
- the length of the currently selected media file (in milliseconds).
-
getDuration
Returns the length of the currently selected media file (in milliseconds).- Returns:
- the length of the currently selected media file (in milliseconds).
-
setPlaybackTime
Sets the current playback position in the media file (in milliseconds).- Parameters:
playbackTime
- the current playback position in the media file (in milliseconds).
-
getPlaybackTime
Returns the current playback position in the media file (in milliseconds).- Returns:
- the current playback position in the media file (in milliseconds).
-
setSources
Sets the list of all media file source URLs.- Parameters:
sources
- the list of all media file source URLs.
-
getSources
Returns the list of all media file source URLs.- Returns:
- the list of all media file source URLs.
-