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 SAPTopLevelTestObject

java.lang.Object   extended by com.rational.test.ft.object.interfaces.TestObject
      extended by com.rational.test.ft.object.interfaces.ClientTestObject
          extended by com.rational.test.ft.object.interfaces.GuiTestObject
              extended by com.rational.test.ft.object.interfaces.FrameTestObject
                  extended by com.rational.test.ft.object.interfaces.TopLevelTestObject
                      extended by com.rational.test.ft.object.interfaces.SAP.SAPTopLevelTestObject
All Implemented Interfaces:
IFrame, IGraphical, ITopWindow

public class SAPTopLevelTestObject
extends TopLevelTestObject

a top level object (GuiModalWindow or GuiMainWindow) in the SAPGUI Scripting framework.


Field Summary
static int VKEY_CTRL_BSLASH
           
static int VKEY_CTRL_C
           
static int VKEY_CTRL_E
           
static int VKEY_CTRL_F
           
static int VKEY_CTRL_F1
           
static int VKEY_CTRL_F10
           
static int VKEY_CTRL_F11
           
static int VKEY_CTRL_F12
           
static int VKEY_CTRL_F2
           
static int VKEY_CTRL_F3
           
static int VKEY_CTRL_F4
           
static int VKEY_CTRL_F5
           
static int VKEY_CTRL_F6
           
static int VKEY_CTRL_F7
           
static int VKEY_CTRL_F8
           
static int VKEY_CTRL_F9
           
static int VKEY_CTRL_FSLASH
           
static int VKEY_CTRL_G
           
static int VKEY_CTRL_N
           
static int VKEY_CTRL_O
           
static int VKEY_CTRL_P
           
static int VKEY_CTRL_PAGEDOWN
           
static int VKEY_CTRL_PAGEUP
           
static int VKEY_CTRL_R
           
static int VKEY_CTRL_S
           
static int VKEY_CTRL_SHIFT_F1
           
static int VKEY_CTRL_SHIFT_F10
           
static int VKEY_CTRL_SHIFT_F11
           
static int VKEY_CTRL_SHIFT_F12
           
static int VKEY_CTRL_SHIFT_F2
           
static int VKEY_CTRL_SHIFT_F3
           
static int VKEY_CTRL_SHIFT_F4
           
static int VKEY_CTRL_SHIFT_F5
           
static int VKEY_CTRL_SHIFT_F6
           
static int VKEY_CTRL_SHIFT_F7
           
static int VKEY_CTRL_SHIFT_F8
           
static int VKEY_CTRL_SHIFT_F9
           
static int VKEY_CTRL_V
           
static int VKEY_CTRL_X
           
static int VKEY_CTRL_Z
           
static int VKEY_ENTER
          Virtual Key contants used by SAP.
static int VKEY_F1
           
static int VKEY_F10
           
static int VKEY_F12
           
static int VKEY_F2
           
static int VKEY_F3
           
static int VKEY_F4
           
static int VKEY_F5
           
static int VKEY_F6
           
static int VKEY_F7
           
static int VKEY_F8
           
static int VKEY_F9
           
static int VKEY_PAGEDOWN
           
static int VKEY_PAGEUP
           
static int VKEY_SHIFT_CTRL_0
           
static int VKEY_SHIFT_F1
           
static int VKEY_SHIFT_F11
           
static int VKEY_SHIFT_F12
           
static int VKEY_SHIFT_F2
           
static int VKEY_SHIFT_F3
           
static int VKEY_SHIFT_F4
           
static int VKEY_SHIFT_F5
           
static int VKEY_SHIFT_F6
           
static int VKEY_SHIFT_F7
           
static int VKEY_SHIFT_F8
           
static int VKEY_SHIFT_F9
           
 
Fields inherited from class com.rational.test.ft.object.interfaces.TestObject
ref
 
Fields inherited from interface com.rational.test.ft.object.interfaces.ITopWindow
INPUTCHARS_METHOD, INPUTKEYS_METHOD
 
Constructor Summary
SAPTopLevelTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject)
          For internal use.
SAPTopLevelTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject, TestObject anchor)
          For internal use.
SAPTopLevelTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject, TestObject anchor, long scriptCommandFlags)
          For internal use.
SAPTopLevelTestObject(TestObject obj)
          Constructs one TestObject from another.
SAPTopLevelTestObject(com.rational.test.ft.object.TestObjectReference ref)
          For internal use.
 
Method Summary
 void createSession()
          Create a session
 SAPGuiApplicationTestObject getApplication()
          Get the SAP Application object associated with this window.
 SAPGuiConnectionTestObject getConnection()
          Get the SAP Connection object associated with this window
 SAPGuiSessionTestObject getSession()
          Get the SAP Session object associated with this window.
 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. Note that this can directly modify the object in the software under test.
 boolean isVKeyAllowed(int vKey)
          Determines if a given virtual key is allowed.
 void resizeWorkingPane(int width, int height, boolean throwOnFail)
          Resizes the window so that the working area has the given width and height in character metric.
 void sendVKey(int vKey)
          Sends a virtual key to the application
 void setFocus()
          Sets the focus.
 boolean visualize(boolean on, java.lang.String innerObject)
          Calling this method of a component will display a red frame around the specified component if the parameter on is true.
 
Methods inherited from class com.rational.test.ft.object.interfaces.TopLevelTestObject
activate, clickDisabled, close, inputChars, inputKeys, isIconified, maximize, minimize, move, resize, restore
 
Methods inherited from class com.rational.test.ft.object.interfaces.FrameTestObject
contextHelp
 
Methods inherited from class com.rational.test.ft.object.interfaces.GuiTestObject
canTakeVP, click, click, click, click, clickRadio, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, ensureObjectIsVisible, getChildAtPoint, getClippedScreenRectangle, getImage, getImage, getScreenPoint, getScreenPoint, getScreenRectangle, getScreenSnapshot, getVisibleArea, hasFocus, hover, hover, hover, hover, invokeProxyWithGuiDelay, invokeProxyWithGuiDelay, isEnabled, isOpaque, isPointInObject, isShowing, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint
 
Methods inherited from class com.rational.test.ft.object.interfaces.ClientTestObject
exists, find, find, findAndInvoke, findAndInvokeProxy, invokeProxy, unregister, waitForExistence
 
Methods inherited from class com.rational.test.ft.object.interfaces.TestObject
compare, compare, compareAndLog, compareAndLog, equals, find, findAndInvoke, 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, isMappedObject, isSameObject, isScreenTestObject, isTopLevelTestObject, performTest, performTest, performTest, performTest, setIndexer, setIndexer, setMapProperties, setProperty, toString, updateTestData, waitForExistence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rational.test.ft.object.interfaces.IFrame
contextHelp
 
Methods inherited from interface com.rational.test.ft.object.interfaces.IGraphical
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, getChildAtPoint, getClippedScreenRectangle, getScreenPoint, getScreenPoint, getScreenRectangle, hasFocus, hover, hover, hover, hover, isEnabled, isOpaque, isPointInObject, isShowing, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint
 

Field Detail

VKEY_ENTER

public static int VKEY_ENTER
Virtual Key contants used by SAP. These are simply a convenience to make the integer arguments to SendVKey more meaningful.


VKEY_F1

public static int VKEY_F1

VKEY_F2

public static int VKEY_F2

VKEY_F3

public static int VKEY_F3

VKEY_F4

public static int VKEY_F4

VKEY_F5

public static int VKEY_F5

VKEY_F6

public static int VKEY_F6

VKEY_F7

public static int VKEY_F7

VKEY_F8

public static int VKEY_F8

VKEY_F9

public static int VKEY_F9

VKEY_F10

public static int VKEY_F10

VKEY_CTRL_S

public static int VKEY_CTRL_S

VKEY_F12

public static int VKEY_F12

VKEY_SHIFT_F1

public static int VKEY_SHIFT_F1

VKEY_SHIFT_F2

public static int VKEY_SHIFT_F2

VKEY_SHIFT_F3

public static int VKEY_SHIFT_F3

VKEY_SHIFT_F4

public static int VKEY_SHIFT_F4

VKEY_SHIFT_F5

public static int VKEY_SHIFT_F5

VKEY_SHIFT_F6

public static int VKEY_SHIFT_F6

VKEY_SHIFT_F7

public static int VKEY_SHIFT_F7

VKEY_SHIFT_F8

public static int VKEY_SHIFT_F8

VKEY_SHIFT_F9

public static int VKEY_SHIFT_F9

VKEY_SHIFT_CTRL_0

public static int VKEY_SHIFT_CTRL_0

VKEY_SHIFT_F11

public static int VKEY_SHIFT_F11

VKEY_SHIFT_F12

public static int VKEY_SHIFT_F12

VKEY_CTRL_F1

public static int VKEY_CTRL_F1

VKEY_CTRL_F2

public static int VKEY_CTRL_F2

VKEY_CTRL_F3

public static int VKEY_CTRL_F3

VKEY_CTRL_F4

public static int VKEY_CTRL_F4

VKEY_CTRL_F5

public static int VKEY_CTRL_F5

VKEY_CTRL_F6

public static int VKEY_CTRL_F6

VKEY_CTRL_F7

public static int VKEY_CTRL_F7

VKEY_CTRL_F8

public static int VKEY_CTRL_F8

VKEY_CTRL_F9

public static int VKEY_CTRL_F9

VKEY_CTRL_F10

public static int VKEY_CTRL_F10

VKEY_CTRL_F11

public static int VKEY_CTRL_F11

VKEY_CTRL_F12

public static int VKEY_CTRL_F12

VKEY_CTRL_SHIFT_F1

public static int VKEY_CTRL_SHIFT_F1

VKEY_CTRL_SHIFT_F2

public static int VKEY_CTRL_SHIFT_F2

VKEY_CTRL_SHIFT_F3

public static int VKEY_CTRL_SHIFT_F3

VKEY_CTRL_SHIFT_F4

public static int VKEY_CTRL_SHIFT_F4

VKEY_CTRL_SHIFT_F5

public static int VKEY_CTRL_SHIFT_F5

VKEY_CTRL_SHIFT_F6

public static int VKEY_CTRL_SHIFT_F6

VKEY_CTRL_SHIFT_F7

public static int VKEY_CTRL_SHIFT_F7

VKEY_CTRL_SHIFT_F8

public static int VKEY_CTRL_SHIFT_F8

VKEY_CTRL_SHIFT_F9

public static int VKEY_CTRL_SHIFT_F9

VKEY_CTRL_SHIFT_F10

public static int VKEY_CTRL_SHIFT_F10

VKEY_CTRL_SHIFT_F11

public static int VKEY_CTRL_SHIFT_F11

VKEY_CTRL_SHIFT_F12

public static int VKEY_CTRL_SHIFT_F12

VKEY_CTRL_E

public static int VKEY_CTRL_E

VKEY_CTRL_F

public static int VKEY_CTRL_F

VKEY_CTRL_FSLASH

public static int VKEY_CTRL_FSLASH

VKEY_CTRL_BSLASH

public static int VKEY_CTRL_BSLASH

VKEY_CTRL_N

public static int VKEY_CTRL_N

VKEY_CTRL_O

public static int VKEY_CTRL_O

VKEY_CTRL_X

public static int VKEY_CTRL_X

VKEY_CTRL_C

public static int VKEY_CTRL_C

VKEY_CTRL_V

public static int VKEY_CTRL_V

VKEY_CTRL_Z

public static int VKEY_CTRL_Z

VKEY_CTRL_PAGEUP

public static int VKEY_CTRL_PAGEUP

VKEY_PAGEUP

public static int VKEY_PAGEUP

VKEY_PAGEDOWN

public static int VKEY_PAGEDOWN

VKEY_CTRL_PAGEDOWN

public static int VKEY_CTRL_PAGEDOWN

VKEY_CTRL_G

public static int VKEY_CTRL_G

VKEY_CTRL_R

public static int VKEY_CTRL_R

VKEY_CTRL_P

public static int VKEY_CTRL_P
Constructor Detail

SAPTopLevelTestObject

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


SAPTopLevelTestObject

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


SAPTopLevelTestObject

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


SAPTopLevelTestObject

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


SAPTopLevelTestObject

public SAPTopLevelTestObject(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. 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.

Overrides:
invoke in class TestObject
Parameters:
method - The name of the method to be called
Returns:
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. 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

Overrides:
invoke in class ClientTestObject
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:
See Also:
TestObject.unregister(), RationalTestScript.unregister(Object[]), RationalTestScript.unregisterAll(), RationalTestScript.getRegisteredTestObjects()

resizeWorkingPane

public void resizeWorkingPane(int width,                               int height,                               boolean throwOnFail)
Resizes the window so that the working area has the given width and height in character metric.

Parameters:
width - the width (in "characters")
height - the height (in "characters")
throwOnFail - whether SAPGUI should throw an exception if resize fails

isVKeyAllowed

public boolean isVKeyAllowed(int vKey)
Determines if a given virtual key is allowed.

Parameters:
vKey - the virtual eky code
Returns:
returns TRUE if the virtual key is allowed

sendVKey

public void sendVKey(int vKey)
Sends a virtual key to the application

Parameters:
vKey - the virtual key code

getApplication

public SAPGuiApplicationTestObject getApplication()
Get the SAP Application object associated with this window.


getSession

public SAPGuiSessionTestObject getSession()
Get the SAP Session object associated with this window.


createSession

public void createSession()
Create a session


getConnection

public SAPGuiConnectionTestObject getConnection()
Get the SAP Connection object associated with this window


setFocus

public void setFocus()
Sets the focus.


visualize

public boolean visualize(boolean on,                          java.lang.String innerObject)
Calling this method of a component will display a red frame around the specified component if the parameter on is true. The frame will be removed if on is false. Some components such as GuiCtrlGridView support displaying the frame around inner objects, such as cells. The format of the innerObject string is the same as for the dumpState method.

Parameters:
on - bool indicating whether or not the highlight rectangle should be on
innerObject -
Returns: