public class SAPGuiConnectionTestObject extends TestObject
ignoreTheObjectState, ref
Constructor and Description |
---|
SAPGuiConnectionTestObject(SpyMappedTestObject mappedObject)
For internal use.
|
SAPGuiConnectionTestObject(SpyMappedTestObject mappedObject,
TestObject anchor)
For internal use.
|
SAPGuiConnectionTestObject(SpyMappedTestObject mappedObject,
TestObject anchor,
long scriptCommandFlags)
For internal use.
|
SAPGuiConnectionTestObject(TestObjectReference ref)
For internal use.
|
Modifier and Type | Method and Description |
---|---|
void |
closeSession(java.lang.String sessionId)
Closes the session specified.
|
TestObject |
findById(java.lang.String id)
Locates a descendant object in the SAPGUI Scripting hierarchy with the matching id.
|
java.lang.Object |
invoke(java.lang.String method)
Invokes a method with no args on the object in the software under test.
|
java.lang.Object |
invoke(java.lang.String method,
java.lang.String methodSignature,
java.lang.Object[] args)
|
compare, compare, compareAndLog, compareAndLog, equals, exists, find, find, find, findAndInvoke, findAndInvoke, findAndInvokeProxy, getActualData, getChildren, getDescribedObject, getDescribedObjects, getDescriptiveName, getDomain, getField, getIndexer, getIndexer, getIndexers, getMappableChildren, getMappableParent, getMapProperties, getMethods, getNameInScript, getNonValueProperties, getObjectClassName, getObjectCustomClassName, getObjectReference, getOwnedObjects, getOwner, getParent, getProcess, getProperties, getProperty, getPropertyFromMap, getRecognitionProperties, getRecognitionPropertyWeight, getScriptCommandFlags, getStandardProperties, getTestData, getTestDataTypes, getTopMappableParent, getTopParent, hashCode, invoke, invoke, invokeProxy, invokeProxy, invokeProxy, isLoggedDuringUnregister, isMappedObject, isSameObject, isScreenTestObject, isTopLevelTestObject, performTest, performTest, performTest, performTest, setIndexer, setIndexer, setLoggedDuringUnregister, setMapProperties, setProperty, toString, unregister, updateTestData, waitForExistence, waitForExistence
public SAPGuiConnectionTestObject(SpyMappedTestObject mappedObject)
public SAPGuiConnectionTestObject(SpyMappedTestObject mappedObject, TestObject anchor)
public SAPGuiConnectionTestObject(SpyMappedTestObject mappedObject, TestObject anchor, long scriptCommandFlags)
public SAPGuiConnectionTestObject(TestObjectReference ref)
public java.lang.Object invoke(java.lang.String method)
invoke
in class TestObject
method
- The name of the method to be calledIf the returned object is not a value class, invoke registers the object and returns a reference to the object in the software under test. As always, registered object references should be released by calling one of the unregister methods.
invoke(String,String,Object[])
,
TestObject.unregister()
,
RationalTestScript.unregister(Object[])
,
RationalTestScript.unregisterAll()
,
RationalTestScript.getRegisteredTestObjects()
public java.lang.Object invoke(java.lang.String method, java.lang.String methodSignature, java.lang.Object[] args)
invoke
in class TestObject
method
- the name of the method to be calledmethodSignature
- the signature of the method to be called (using standard JNI syntax)args
- the arguments to be passed to the methodIf the returned object is not a value class, invoke registers the object and returns a reference to the object in the software under test. Registered object references are released by calling one of the unregister methods.
The methodSignature uses JNI syntax to describe the parameter types and optionally the return value types for the method. The general syntax has the parameter types in parentheses, followed by the return type: (parameterTypes)returnType. Note that the returnType is not a required part of the signature - it can be omitted. There are specific encodings for the primitive types, and then a general encoding for class types.
Code | Type |
---|---|
Z | boolean |
B | byte |
C | char |
S | short |
I | int |
J | long |
F | float |
D | double |
V | void |
Lfully-qualified-class; | For example: Ljava.lang.string; |
In addition, arrays are specified by combining the brace character '[' with another type. For example, [I is an array of integers, [[I is an array of arrays of integers and [Ljava.lang.Object; is an array of Objects. Another example:
has the following signature:
TestObject.unregister()
,
RationalTestScript.unregister(Object[])
,
RationalTestScript.unregisterAll()
,
RationalTestScript.getRegisteredTestObjects()
public TestObject findById(java.lang.String id)
id
- The id of the object to locateNULL
if one could not be located.NULL
is returned.SAPGuiTextTestObject to = SAPGuiConnectionTestObject.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtHEADER-FBFOOTLINE")
SAPGuiTextTestObject to = SAPGuiConnectionTestObject.findById("txtHEADER-FBFOOTLINE")
public void closeSession(java.lang.String sessionId)
sessionId
- The session to close