public class ActiveXProxy extends ProxyTestObject
TestObject
Modifier and Type | Class and Description |
---|---|
class |
ActiveXProxy.InvalidNativeHandleException |
class |
ActiveXProxy.NativeProxyReleasedException |
class |
ActiveXProxy.ReleaseElementHandleRunnable |
Modifier and Type | Field and Description |
---|---|
protected IChannel |
channel |
protected static FtDebug |
debug |
protected ProxyTestObject |
tempParent |
protected static java.lang.String |
TESTDATA_TEXT |
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 |
---|
ActiveXProxy(long handle) |
Modifier and Type | Method and Description |
---|---|
void |
addRecognitionProperty(java.lang.String property,
java.lang.Object value,
int weight)
Not implemented
|
long |
detach()
Detach the native proxy and return its handle.
|
boolean |
equals(java.lang.Object obj)
Overrides the object-level
equals with an equality against the
handles of the underlying test objects. |
HtmlProxy |
findElementWithName(java.lang.String name)
Element does not have children.
|
protected java.lang.Object |
getAddedRecognitionPropertyValue(java.lang.String propertyName) |
IChannel |
getChannel()
Return the channel associated with this object.
|
ProxyTestObject[] |
getChildren()
Objects have no children
|
java.util.Enumeration |
getChildrenEnumeration()
Objects have no children
|
java.lang.String |
getDescriptiveName()
Returns a name that can be used to describe the associated UI
object in a script.
|
protected long |
getHandle() |
java.lang.Object |
getIndexer(java.lang.String name,
java.lang.Object[] indexes)
Gets the value of an indexed property
|
IndexerInfo[] |
getIndexers()
Gets information about a
TestObject's indexed properties |
ProxyTestObject[] |
getMappableChildren()
Objects have no children
|
ProxyTestObject |
getMappableParent()
Returns null always because object relationships are not
applicable.
|
protected ProxyTestObject |
getMappableParentInternal()
Returns null always because object relationships are not
applicable.
|
MethodInfo[] |
getMethods()
Returns an array of MethodInfos
|
MethodSpecification |
getMethodSpecForPoint(java.awt.Point pt)
Returns a
MethodSpecification for a method that returns a java.awt.Point
for the specified coordinates. |
java.util.Hashtable |
getNonValueProperties()
return the properties that are not supported because of the return value
|
java.lang.Object |
getObject() |
java.lang.String |
getObjectClassName()
Returns the class name of the associated object.
|
ProxyTestObject[] |
getOwnedObjects()
Returns null always
|
ProxyTestObject |
getOwner()
Returns null always
|
ProxyTestObject |
getParent()
Returns null always because object relationships are not
applicable.
|
java.util.Hashtable |
getProperties()
Returns a complete set of properties for the associated
test object.
|
java.lang.Object |
getProperty(java.lang.String propertyName)
Get the value for a specific property.
|
java.lang.Object |
getPropertyInternal(java.lang.String propertyName)
Get the value for a specific property.
|
java.util.Hashtable |
getRecognitionProperties()
Not a GUI object so does not have any recogntion properties
|
int |
getRecognitionPropertyWeight(java.lang.String propertyName)
Returns an indication of how useful this property is for recognition.
|
int |
getRefCount() |
int |
getRefCount(long handle) |
java.lang.String |
getRole()
Returns
TestObjectRole.ROLE_OBJECT . |
ScriptCommandFlags |
getScriptCommandFlags()
This method returns an active state value that reflects the state of the
test object at the time of the call.
|
java.util.Hashtable |
getStandardProperties()
Returns a complete set of consistent properties for the associated
test object.
|
ITestData |
getTestData(java.lang.String testDataType)
This method 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.
|
TestDomainImplementation |
getTestDomain()
Return the
TestDomainImplementation
that this proxy object is associated with. |
java.lang.String |
getTestObjectClassName()
Returns a valid class name specification.
|
java.lang.String |
getText()
Element does not have associated text.
|
ProxyTestObject |
getTopMappableParent()
Returns
getTopParent() which is the browser and
is always mappable. |
ProxyTestObject |
getTopParent()
Returns null always because object relationships are not
applicable.
|
java.lang.String |
getUniqueId()
Return a unique string for the associated object.
|
boolean |
hasAddedRecognitionProperties()
Returns
true if recognition properties have been added
to this proxy from an external source through addRecognitionProperty() . |
void |
initialize(HtmlTestDomainImplementation domain,
IChannel channel) |
boolean |
isReleaseRequired() |
boolean |
isSameObject(java.lang.Object obj)
Returns
true if the supplied test object represents the same
underlying object. |
long |
marshalInterface() |
long |
marshalInterface(long handle) |
void |
processMouseEvent(IMouseActionInfo action)
Updates the supplied
action with an appropriate
MethodSpecification to play back the action. |
void |
release() |
protected void |
release(long nativeHandle) |
void |
releaseElementHandle(long handle) |
void |
releaseMeow(long meowHandle) |
void |
releaseMeow(long handle,
long meowHandle) |
void |
setIndexer(java.lang.String name,
java.lang.Object[] indexes,
java.lang.Object val)
Sets the value of an indexed property
|
void |
setProperty(java.lang.String propertyName,
java.lang.Object value)
Set the value for a specific property.
|
boolean |
shouldBeMapped()
Returns false, by default only GUI test objects are mapped.
|
ITestData |
updateTestData(java.lang.String testDataType,
ITestData testData)
This method updates the supplied test data object and returns it.
|
addDataDrivableCommands, baseClassMatch, canTakeVP, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChildren, getDataDrivableCommand, getDataDrivableCommands, getElementWithFocus, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getScriptCommandAnchor, getVisualClippableParent, getVisualClippedRectangle, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isValidObject, ping, suppressKeyAction
protected static FtDebug debug
protected IChannel channel
protected ProxyTestObject tempParent
protected static final java.lang.String TESTDATA_TEXT
public void initialize(HtmlTestDomainImplementation domain, IChannel channel)
public IChannel getChannel()
getChannel
in class ProxyTestObject
protected long getHandle()
public boolean equals(java.lang.Object obj)
equals
with an equality against the
handles of the underlying test objects.equals
in class ProxyTestObject
obj
- The object to compare against. If obj
is a
ProxyTestObject
, the comparison is made with
the underlying object.true
if the underlying test objects are equal
.public boolean isSameObject(java.lang.Object obj)
ProxyTestObject
true
if the supplied test object represents the same
underlying object. This method is different from equals
in that it represents an "==" of the object in the AUT rather than an
"equals" of these objects.isSameObject
in class ProxyTestObject
obj
- The object to compare against. If obj
is a
ProxyTestObject
, the comparison is made with
the underlying object.true
if the underlying test objects are ==
.public java.lang.String getTestObjectClassName()
ProxyTestObject
TestObject
class. The testObject
performs a cross-process (and cross-JVM) call to the
same method against an associated proxy, which is this proxy.
This method should never return null
, even if shouldBeMapped()
returns false
. User may still access objects such as this through
scripting method calls and can return references to them.
If a null were returned, the marshalling code would be confused and would not
be able to construct a test object.
This method may be called from any thread.
getTestObjectClassName
in interface IProxyBase
getTestObjectClassName
in class ProxyTestObject
testObject
class full name.public final TestDomainImplementation getTestDomain()
TestDomainImplementation
that this proxy object is associated with.
This method should not be overriden.getTestDomain
in interface IProxyBase
getTestDomain
in class ProxyTestObject
TestDomainImplementation
.public java.lang.String getDescriptiveName()
ProxyTestObject
java.awt.Button
with the associated text "OK".getDescriptiveName
in class ProxyTestObject
public java.lang.String getRole()
TestObjectRole.ROLE_OBJECT
.getRole
in class ProxyTestObject
public void processMouseEvent(IMouseActionInfo action)
ProxyTestObject
action
with an appropriate
MethodSpecification
to play back the action. This
method is the primary record interface for mouse events against a particular
control. Only one MethodSpecification
is maintained in the
action state. If the active specification is valid, it is not updated.processMouseEvent
in class ProxyTestObject
action
- The event cache and other mouse state information
for this mouse action.IMouseActionInfo
,
com.rational.test.ft.sys.MethodSpecification
public java.lang.String getUniqueId()
getUniqueId
in class ProxyTestObject
public boolean shouldBeMapped()
shouldBeMapped
in class ProxyTestObject
public java.lang.Object getObject()
public java.lang.String getObjectClassName()
ProxyTestObject
getObjectClassName
in class ProxyTestObject
public ProxyTestObject getParent()
getParent
in class ProxyTestObject
public ProxyTestObject getMappableParent()
getMappableParent
in class ProxyTestObject
protected ProxyTestObject getMappableParentInternal()
public ProxyTestObject getTopParent()
getTopParent
in class ProxyTestObject
public ProxyTestObject getTopMappableParent()
getTopParent()
which is the browser and
is always mappable.getTopMappableParent
in class ProxyTestObject
public java.util.Enumeration getChildrenEnumeration()
public ProxyTestObject[] getChildren()
getChildren
in class ProxyTestObject
public ProxyTestObject[] getMappableChildren()
getMappableChildren
in class ProxyTestObject
public ProxyTestObject getOwner()
getOwner
in class ProxyTestObject
public ProxyTestObject[] getOwnedObjects()
getOwnedObjects
in class ProxyTestObject
public MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
ProxyTestObject
MethodSpecification
for a method that returns a java.awt.Point
for the specified coordinates. By default, a method specification for
IGraphical.getScreenPoint
is returned.getMethodSpecForPoint
in class ProxyTestObject
com.rational.test.ft.sys.MethodSpecification
public java.util.Hashtable getRecognitionProperties()
getRecognitionProperties
in class ProxyTestObject
TestObjectProperty
.ProxyTestObject.getRecognitionPropertyWeight(String)
,
ProxyTestObject.getProperty(String)
,
ProxyTestObject.addRecognitionProperty(String,Object,int)
public int getRecognitionPropertyWeight(java.lang.String propertyName)
ProxyTestObject
getRecognitionPropertyWeight
in class ProxyTestObject
propertyName
- The name of the recognition property to
return a weight value for.ProxyTestObject.getRecognitionProperties()
public void addRecognitionProperty(java.lang.String property, java.lang.Object value, int weight)
addRecognitionProperty
in class ProxyTestObject
property
- The recognition property name. Care should be taken to
avoid conflicts with existing property names.value
- The value of the added recognition property.weight
- The weight associated with this recognition property.
This value is returned when getRecognitionPropertyWeight()
is called.ProxyTestObject.getRecognitionProperties()
,
ProxyTestObject.getRecognitionPropertyWeight(String)
,
ProxyTestObject.getProperty(String)
public boolean hasAddedRecognitionProperties()
ProxyTestObject
true
if recognition properties have been added
to this proxy from an external source through addRecognitionProperty()
.hasAddedRecognitionProperties
in class ProxyTestObject
true
if recognition properties have been added
to this proxy from an external source through addRecognitionProperty(String,Object,int)
.ProxyTestObject.addRecognitionProperty(String,Object,int)
protected java.lang.Object getAddedRecognitionPropertyValue(java.lang.String propertyName)
public java.util.Hashtable getProperties()
ProxyTestObject
This method does not return properties whose values are references
to objects. The method ProxyTestObject.getNonValueProperties()
returns
information about such properties.
getProperties
in class ProxyTestObject
ProxyTestObject.getProperty(String)
,
ProxyTestObject.setProperty(String,Object)
,
ProxyTestObject.getStandardProperties()
,
ProxyTestObject.getNonValueProperties()
public java.util.Hashtable getStandardProperties()
ProxyTestObject
ProxyTestObject.getProperties()
.
The HTML domain supports standard properties and
returns properties that are consistent across browser versions.
The Java domain does not support this notion of standard properties.
In this domain, getStandardProperties,
and getProperties
do the same thing.
For HTML, standard properties are a subset
of the properties returned by getProperties()
.
The meaning of a property is specific to the test domain
and the test object. Typically, this is a set of name/value pairs
that describe the test object and its active state. Properties such
as font, colors, and coordinate information are typically associated
with a GUI test object. Associated data and state information can also
be returned, depending on the test object.getStandardProperties
in class ProxyTestObject
ProxyTestObject.getProperty(String)
,
ProxyTestObject.setProperty(String,Object)
,
ProxyTestObject.getProperties()
,
ProxyTestObject.getNonValueProperties()
public java.util.Hashtable getNonValueProperties()
getNonValueProperties
in class ProxyTestObject
ProxyTestObject.getProperties()
,
ProxyTestObject.getStandardProperties()
,
ProxyTestObject.getProperty(String)
,
ProxyTestObject.setProperty(String,Object)
public java.lang.Object getIndexer(java.lang.String name, java.lang.Object[] indexes)
getIndexer
in class ProxyTestObject
name
- the name of the indexerindexes
- the indexes to get the value ofpublic IndexerInfo[] getIndexers()
TestObject's
indexed propertiesgetIndexers
in class ProxyTestObject
com.rational.test.ft.value.IndexerInfo
public void setIndexer(java.lang.String name, java.lang.Object[] indexes, java.lang.Object val)
setIndexer
in class ProxyTestObject
name
- the name of the indexerindexes
- the indexes to set the value ofpublic MethodInfo[] getMethods()
getMethods
in class ProxyTestObject
ProxyTestObject.getProperties()
,
ProxyTestObject.getStandardProperties()
,
ProxyTestObject.getNonValueProperties()
public java.lang.Object getProperty(java.lang.String propertyName)
getProperty
in class ProxyTestObject
propertyName
- The name of the property to fetch.ProxyTestObject.getProperties()
,
ProxyTestObject.setProperty(String,Object)
,
ProxyTestObject.getRecognitionProperties()
,
ProxyTestObject.addRecognitionProperty(String,Object,int)
public java.lang.Object getPropertyInternal(java.lang.String propertyName)
public void setProperty(java.lang.String propertyName, java.lang.Object value)
setProperty
in class ProxyTestObject
propertyName
- The name of the property to redefine. This
name is the same as that returned by
getProperties()
.ProxyTestObject.getProperties()
,
ProxyTestObject.getProperty(String)
public ScriptCommandFlags getScriptCommandFlags()
ProxyTestObject
getScriptCommandFlags
in class ProxyTestObject
public long detach()
public boolean isReleaseRequired()
public void release()
public void releaseElementHandle(long handle)
protected void release(long nativeHandle)
public java.lang.String getText()
public HtmlProxy findElementWithName(java.lang.String name)
public java.util.Hashtable getTestDataTypes()
getTestDataTypes
in class ProxyTestObject
getTestData(String)
,
ITestData
public ITestData getTestData(java.lang.String testDataType)
getTestDataTypes
.getTestData
in class ProxyTestObject
testDataType
- A test data type supplied by
getTestDataTypes
.getTestDataTypes()
,
ITestData
public ITestData updateTestData(java.lang.String testDataType, ITestData testData)
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 data base object that requires
updating.getTestDataTypes()
,
ITestData
public long marshalInterface()
public void releaseMeow(long meowHandle)
public int getRefCount()
public long marshalInterface(long handle)
public void releaseMeow(long handle, long meowHandle)
public int getRefCount(long handle)