IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.object.interfaces.SAP
Class SAPGuiConnectionTestObject

java.lang.Object   extended by com.rational.test.ft.object.interfaces.TestObject
      extended by com.rational.test.ft.object.interfaces.SAP.SAPGuiConnectionTestObject

public class SAPGuiConnectionTestObject
extends TestObject

A TestObject representing a SAPGUI Scripting GuiConnection object. A GuiConnection represents the connection between SAP GUI and an application server. Connections can be opened from SAPlogon or from GuiApplication’s openConnection and openConnectionByConnectionString methods.


Field Summary
 
Fields inherited from class com.rational.test.ft.object.interfaces.TestObject
ref
 
Constructor Summary
SAPGuiConnectionTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject)
          For internal use.
SAPGuiConnectionTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject, TestObject anchor)
          For internal use.
SAPGuiConnectionTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject, TestObject anchor, long scriptCommandFlags)
          For internal use.
SAPGuiConnectionTestObject(TestObject obj)
          Constructs one TestObject from another.
SAPGuiConnectionTestObject(com.rational.test.ft.object.TestObjectReference ref)
          For internal use.
 
Method Summary
 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)
           Invokes a method on the object in the software under test.
 
Methods inherited from class com.rational.test.ft.object.interfaces.TestObject
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, invokeProxy, invokeProxy, isMappedObject, isSameObject, isScreenTestObject, isTopLevelTestObject, performTest, performTest, performTest, performTest, setIndexer, setIndexer, setMapProperties, setProperty, toString, unregister, updateTestData, waitForExistence, waitForExistence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SAPGuiConnectionTestObject

public SAPGuiConnectionTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject)
For internal use.


SAPGuiConnectionTestObject

public SAPGuiConnectionTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject,                                   TestObject anchor)
For internal use.


SAPGuiConnectionTestObject

public SAPGuiConnectionTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject,                                   TestObject anchor,                                   long scriptCommandFlags)
For internal use.


SAPGuiConnectionTestObject

public SAPGuiConnectionTestObject(com.rational.test.ft.object.TestObjectReference ref)
For internal use.


SAPGuiConnectionTestObject

public SAPGuiConnectionTestObject(TestObject obj)
Constructs one TestObject from another. Both are references to the same Object.

Method Detail

invoke

public java.lang.Object invoke(java.lang.String method)
Invokes a method with no args on the object in the software under test.

Overrides:
invoke in class TestObject
Parameters:
method - The name of the method to be called
Returns:
An object of type java.lang.Object.
Detail description:
Invokes a method with no args on the object in the software under test. Note that this can directly modify the object in the software under test and therefore should be done with extreme care. Whenever possible, you should avoid using invoke, which allows you to modify the software under test in ways that a typical user cannot. If you use this method, you should be sure to discuss its use with the developers of the software you are testing.

If 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.

Since:
RFT 7.0
See Also:
invoke(String,String,Object[]), TestObject.unregister(), RationalTestScript.unregister(Object[]), RationalTestScript.unregisterAll(), RationalTestScript.getRegisteredTestObjects()

invoke

public java.lang.Object invoke(java.lang.String method,                                java.lang.String methodSignature,                                java.lang.Object[] args)
Invokes a method on the object in the software under test.

Overrides:
invoke in class TestObject
Parameters:
method - the name of the method to be called
methodSignature - the signature of the method to be called (using standard JNI syntax)
args - the arguments to be passed to the method
Returns:
An object of type java.lang.Object.
Detail description:
Invokes a method on the object in the software under test. Note that this can directly modify the object in the software under test. You should therefore be extremely careful when you do this. Whenever possible, avoid using Invoke, which allows you to modify the software under test in ways that a typical user cannot. If you use this method, be sure to discuss its use with the developers of the software you are testing.

If 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.

CodeType
Zboolean
Bbyte
Cchar
Sshort
Iint
Jlong
Ffloat
Ddouble
Vvoid
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:

void myMethod(long n, string s, int[] arr)

has the following signature:

(JLjava.lang.string;[I)V
Since:
RFT 7.0
See Also:
TestObject.unregister(), RationalTestScript.unregister(Object[]), RationalTestScript.unregisterAll(), RationalTestScript.getRegisteredTestObjects()

findById

public TestObject findById(java.lang.String id)
Locates a descendant object in the SAPGUI Scripting hierarchy with the matching id.

Parameters:
id - The id of the object to locate
Returns:
A TestObject representing the located SAPGUI Scripting object, or NULL if one could not be located.
Detail description:
Search through the object's descendants for a given id. If the parameter is a fully qualified id, the function will first check if thecontainer object's id is a prefix of the id parameter. If that is the case, this prefix is truncated. If no descendant with the given id can be found a NULL is returned.
Example:
Unless there are several sessions or connections in use, the following calls are equivalent:

SAPGuiTextTestObject to = SAPGuiConnectionTestObject.findById("/app/con[0]/ses[0]/wnd[0]/usr/txtHEADER-FBFOOTLINE")

SAPGuiTextTestObject to = SAPGuiConnectionTestObject.findById("txtHEADER-FBFOOTLINE")

Since:
RFT 7.0

closeSession

public void closeSession(java.lang.String sessionId)
Closes the session specified.

Parameters:
sessionId - The session to close
Detail description:
closeSession() closes the session specified. Closing the last session will also close the owning connection.
Example:
SAPGuiSessionTestObject.closeSession("/app/con[0]")
Since:
RFT 7.0