public class CheckboxProxy extends ComponentProxy implements IRadioButtonProxy
ToggleGUITestObject
Type | Desciption | Data Class |
---|---|---|
text | CheckBox Visible Text | ITestDataText |
state | CheckBox Button State | ITestData |
Property | Usage |
---|---|
.class | The Java full class name of the test object. |
.classIndex | The zero-based index of the class relative to the immediate parent in the object map. |
.priorLabel | The text of a preceding label. Suppressed if there is no preceding label. |
label | The visible text of the checkbox. If there is no visible text this property is omitted. |
name | The name property, suppressed if default formatted (default form = className+count). |
ComponentProxy.ChildEnumerator, ComponentProxy.ImmediateChildEnumerator
childrenEnumerated, CLASSINDEX, CLASSINDEXWEIGHT, MAX_NAME, NAMEPROPERTY, NAMEPROPERTYWEIGHT, PRIORLABEL, PRIORLABELWEIGHT
LEFT, preDownState, processMouseEventHandler, ROLEINDEX, ROLEINDEXWEIGHT, TESTDATA_SPECIALFRAMESTATE, TESTDATA_SPECIALFRAMESTATE_DESCRIPTION, topLevelWindow
BROWSERTABTESTOBJECT_CLASSNAME, BROWSERTESTOBJECT_CLASSNAME, COLORDIALOGTESTOBJECT_CLASSNAME, CROSSDOMAINCONTAINER_CLASSNAME, DOCUMENTTESTOBJECT_CLASSNAME, DOMAINTESTOBJECT_CLASSNAME, ECLIPSETOPLEVELTESTOBJECT_CLASSNAME, EMBEDDEDBROWSERTESTOBJECT_CLASSNAME, FILEDIALOGTESTOBJECT_CLASSNAME, FRAMESUBITEMTESTOBJECT_CLASSNAME, FRAMETESTOBJECT_CLASSNAME, GEFEDITPARTTESTOBJECT_CLASSNAME, GUISUBITEMTESTOBJECT_CLASSNAME, GUITESTOBJECT_CLASSNAME, INTERNALFRAMETESTOBJECT_CLASSNAME, MESSAGEBOXTESTOBJECT_CLASSNAME, PALETTEGUISUBITEMTESTOBJECT_CLASSNAME, PROCESSTESTOBJECT_CLASSNAME, SCROLLSUBITEMTESTOBJECT_CLASSNAME, SCROLLTESTOBJECT_CLASSNAME, SELECTGUISUBITEMTESTOBJECT_CLASSNAME, SELECTSCROLLGUISUBITEMTESTOBJECT_CLASSNAME, SHELLTESTOBJECT_CLASSNAME, STATELESSGUISUBITEMTESTOBJECT_CLASSNAME, SUBITEMTESTOBJECT_CLASSNAME, TABITEMTESTOBJECT_CLASSNAME, TESTOBJECT_CLASSNAME, TEXTGUISUBITEMTESTOBJECT_CLASSNAME, TEXTGUITESTOBJECT_CLASSNAME, TEXTSCROLLTESTOBJECT_CLASSNAME, TEXTSELECTGUISUBITEMTESTOBJECT_CLASSNAME, TIMEOUTTESTOBJECT_CLASSNAME, TOGGLEGUITESTOBJECT_CLASSNAME, TOGGLETESTOBJECT_CLASSNAME, TOPLEVELSUBITEMTESTOBJECT_CLASSNAME, TOPLEVELTESTOBJECT_CLASSNAME, TRACKBARTESTOBJECT_CLASSNAME, vomClippedRectangle
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
Constructor and Description |
---|
CheckboxProxy(java.lang.Object theObjectInTheSUT)
Sets the SUT object
as a member variable for the proxy.
|
Modifier and Type | Method and Description |
---|---|
void |
clickToState(MouseModifiers modifiers,
State state)
Performs the necessary mouse actions to attain the
desired state for the associated component.
|
void |
clickToState(State state)
Performs the necessary mouse actions to attain the
desired state for the associated component.
|
void |
deselect()
Sets the state of the associated object to
NOT_SELECTED.
|
void |
dragToState(MouseModifiers modifiers,
State state)
Performs the necessary mouse actions to attain the
desired state for the associated component.
|
void |
dragToState(State state)
Performs the necessary mouse actions to attain the
desired state for the associated component.
|
MethodSpecification |
getDataDrivableCommand()
This method must be implemented by any proxy that wishes to support
data driving.
|
MethodSpecification[] |
getDataDrivableCommands(int includeChildren)
Walks the proxy parent-child hierarchy and returns a command for each
control that is data drivable.
|
Property[] |
getDataDrivenRecognitionProperties(java.util.Hashtable radiobuttonGroups)
Return a limited set of properties that can be used to identify all
radiobuttons in the group.
|
java.lang.String |
getDescriptiveName()
Returns a name that can be used to describe the associated UI
object in a script.
|
java.lang.String |
getLabel()
Returns the label for the Checkbox object.
|
java.lang.Object |
getProperty(java.lang.String propertyName)
Gets the value for a specific property.
|
java.lang.Object |
getRadioButtonGroup()
Return access to the radio button group object.
|
java.lang.String |
getRole()
Returns
TestObjectRole.ROLE_CHECK_BOX . |
State |
getState()
Returns the state of the associated object.
|
ITestData |
getTestData(java.lang.String testDataType)
Constructs the specified verification data object.
|
java.util.Hashtable |
getTestDataTypes()
Returns a hashtable of data type descriptions of the verification
point data available with the associated object in the SUT.
|
java.lang.String |
getTestObjectClassName()
Returns the top level GUI test object classname that implements
ITopWindow.
|
java.lang.String |
getVariableDataDrivenRecognitionProperty(Property[] properties)
Only one recognition property will be data driven by default, this
method specifies that property.
|
void |
indeterminate()
Sets the state of the associated object to
INDETERMINATE.
|
boolean |
isRadioSelected()
Specifies if the radiobutton is currently selected.
|
void |
processSingleMouseEvent(IMouseActionInfo action)
Returns a method specification for the specified mouse event.
|
void |
select()
Sets the state of the associated object to
SELECTED.
|
void |
setState(State state)
Sets the state of the associated object to the specified
state.
|
ITestData |
updateTestData(java.lang.String testDataType,
ITestData testData)
Updates the supplied test data object and returns it.
|
canBeScrolled, childConstructed, getChildAtPoint, getChildProxy, getChildrenEnumeration, getClippedRect, getComponentChildren, getElementWithFocus, getEmbeddedBrowsers, getImmediateChildren, getLabelText, getLeadingLabel, getLocationOnScreen, getMappableChildren, getMappableParent, getName, getOwnedObjects, getOwner, getParent, getParent2, getParentObject, getScreenRectangle, getTopParent, getWindow, hasFocus, isDopeyDynamicName, isEnabled, isHScroll, isLabelled, isOpaque, isRecognitionProperty, isShowing, isVScroll, setParent
activateTopWindow, click, click, click, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, dumpAction, ensureObjectIsVisible, getActionRect, getCachedRectX, getCachedRectY, getClippedScreenRectangle, getMethodSpecForPoint, getProcessMouseEventHandler, getRegisteredTopLevelWindow, getScreenPoint, getScreenPoint, getScriptCommandFlags, getTopMappableWindow, getTopWindow, hover, hover, hover, hover, invokeMethodOnEDT, isDrag, isPointInObject, isPointInObject, modifiersChanged, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint, processHoverMouseEvent, processMouseEvent, scrollRectToVisible, setProcessMouseEventHandler, setTopLevelWindow, shouldBeMapped
addMappableChildrenToVector, addRecognitionProperty, allowProperty, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMethods, getNonValueProperties, getProperties, getRecognitionProperties, getRecognitionPropertyWeight, getStandardProperties, getTestDomain, getTopMappableParent, getUniqueId, getVisualClippableParent, hasAddedRecognitionProperties, setIndexer, setProperty
addDataDrivableCommands, baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChannel, getChildren, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getScriptCommandAnchor, getVisualClippedRectangle, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction
public CheckboxProxy(java.lang.Object theObjectInTheSUT)
public java.lang.String getTestObjectClassName()
getTestObjectClassName
in interface IProxyBase
getTestObjectClassName
in class JavaGuiProxy
public java.lang.String getLabel()
public java.lang.String getDescriptiveName()
getDescriptiveName
in class ComponentProxy
public java.lang.String getRole()
TestObjectRole.ROLE_CHECK_BOX
.getRole
in class ComponentProxy
public java.lang.Object getProperty(java.lang.String propertyName)
getProperty
in class ComponentProxy
propertyName
- The name of the property to fetch.ProxyTestObject.getProperties()
,
ProxyTestObject.setProperty(String,Object)
,
ProxyTestObject.getRecognitionProperties()
,
ProxyTestObject.addRecognitionProperty(String,Object,int)
public MethodSpecification[] getDataDrivableCommands(int includeChildren)
ProxyTestObject
null
.
The reason that the proxies are left with doing the walk instead of it happening at a higher level is because they have a better understanding of the hierarchy they expose. Domains like HTML can take advantage of internal knowledge to allow them better control the traversal of interesting child proxies relative to data driving. By default this method will perform a standard traversal of the proxy hierarchy and does not need to be overridden unless necessary.
getDataDrivableCommands
in interface IDataDriven
getDataDrivableCommands
in class ProxyTestObject
includeChildren
- Flag to control which child objects are considered
for data driving. Must be IDataDriven.INCLUDE_JUSTOBJECT
,
IDataDriven.INCLUDE_SIBLINGS
or IDataDriven.INCLUDE_ALL
.ProxyTestObject.getDataDrivableCommand()
public MethodSpecification getDataDrivableCommand()
null
value is returned.getDataDrivableCommand
in interface IDataDriven
getDataDrivableCommand
in class ProxyTestObject
getDataDrivableCommands(int)
public void processSingleMouseEvent(IMouseActionInfo action)
processSingleMouseEvent
method is implemented in order to
record clickToState
against checkboxes. But for checkboxes that are
really radiobuttons (part of a CheckBoxGroup), ordinary clicks are recorded.processSingleMouseEvent
in class JavaGuiProxy
action
- The event cache and other mouse state information
for this mouse action.MethodSpecification
public void clickToState(State state)
state
- The desired target state for the associated
component.public void clickToState(MouseModifiers modifiers, State state)
modifiers
- The mouse modifiers to be used to attain the
desired state.state
- The desired target state for the associated
component.public void dragToState(State state)
state
- The desired target state for the associated
component.public void dragToState(MouseModifiers modifiers, State state)
modifiers
- The mouse modifiers to be used to attain the
desired state.state
- The desired target state for the associated
component.public void setState(State state)
public State getState()
State
literals.com.rational.test.ft.script.State
public void select()
UnsupportedActionException
exception will be thrown if
this action can not be performed.public void deselect()
UnsupportedActionException
exception is thrown if
this action cannot be performed.public void indeterminate()
UnsupportedActionException
exception is thrown if
this action cannot be performed.public java.util.Hashtable getTestDataTypes()
JavaProxy
getTestDataTypes
in class JavaProxy
ProxyTestObject.getTestData(String)
,
ITestData
public ITestData getTestData(java.lang.String testDataType)
ProxyTestObject
testDataType
parameter is a hashtable key
returned by getTestDataTypes()
.getTestData
in class ProxyTestObject
testDataType
- A test data type supplied by
getTestDataTypes()
.ProxyTestObject.getTestDataTypes()
,
com.rational.test.ft.vp.ITestData
public ITestData updateTestData(java.lang.String testDataType, ITestData testData)
ProxyTestObject
testDataType
parameter is a hashtable key
returned by ProxyTestObject.getTestDataTypes()
.
The testData
is a previously supplied ITestData
object that needs to be updated to reflect the current state
of the associated test object.updateTestData
in class ProxyTestObject
testDataType
- A test data type supplied by
getTestDataTypes()
.testData
- The test database object that requires
updating.testData
passed in with appropriate updates.ProxyTestObject.getTestDataTypes()
,
com.rational.test.ft.vp.ITestData
public java.lang.Object getRadioButtonGroup()
IRadioButtonProxy
null
should be returned and all radiobuttons
in the parent will be treated as if they come from the same group.getRadioButtonGroup
in interface IRadioButtonProxy
public Property[] getDataDrivenRecognitionProperties(java.util.Hashtable radiobuttonGroups)
IRadioButtonProxy
getDataDrivenRecognitionProperties
in interface IRadioButtonProxy
radiobuttonGroups
- The set of radiobutton groups available from
the same parent. The key to the map is the
group
object and
the value is a java.util.Vector
of
the radiobuttons in the group.public java.lang.String getVariableDataDrivenRecognitionProperty(Property[] properties)
IRadioButtonProxy
#getDataDrivenRecognitionProperties()
.
Nothing will be data driven if this property name is not in that set.getVariableDataDrivenRecognitionProperty
in interface IRadioButtonProxy
properties
- The properties returned by IRadioButtonProxy.getDataDrivenRecognitionProperties(Hashtable)
.public boolean isRadioSelected()
IRadioButtonProxy
isRadioSelected
in interface IRadioButtonProxy