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 SAPGuiCalendarTestObject

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.SAP.SAPGuiCalendarTestObject
All Implemented Interfaces:
IGraphical

public class SAPGuiCalendarTestObject
extends GuiTestObject


Field Summary
 
Fields inherited from class com.rational.test.ft.object.interfaces.TestObject
ref
 
Constructor Summary
SAPGuiCalendarTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject)
          For internal use.
SAPGuiCalendarTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject, TestObject anchor)
          For internal use.
SAPGuiCalendarTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject, TestObject anchor, long scriptCommandFlags)
          For internal use.
SAPGuiCalendarTestObject(TestObject obj)
          Constructs one TestObject from another.
SAPGuiCalendarTestObject(com.rational.test.ft.object.TestObjectReference obj)
          For internal use.
 
Method Summary
 void contextMenu(int CtxMenuId, int CtxMenuCellRow, int CtxMenuCellCol, java.lang.String DateBegin, java.lang.String DateEnd)
          Calling this function opens a context menu.
 java.lang.String createDate(int day, int month, int year)
          Creates a date string
 TestObject[] dumpState(java.lang.String innerObject)
          Dumps the state of the object.
 TestObject[] findAllByName(java.lang.String name, java.lang.String type)
          The methods findByName and findByNameEx return only the first object with matching name and type.
 TestObject[] findAllByNameEx(java.lang.String name, long type)
          Better performance than FindAllByName
 TestObject findById(java.lang.String id, boolean raiseEx)
          Search through the object's descendants for a given id.
 TestObject findByName(java.lang.String name, java.lang.String type)
          Unlike findById, this function does not guarantee a unique result.
 TestObject findByNameEx(java.lang.String name, long type)
          Better performance than FindByName
 int getDay(java.lang.String date)
          Parses the day out of a date string
 int getMonth(java.lang.String date)
          Parse the month out of a date string
 java.lang.String getToday()
          Gets today's date
 java.lang.String getWeekday(java.lang.String date)
          Get the textual representation of the day
 int getWeekNumber(java.lang.String date)
          Get the integer week number for a date
 int getYear(java.lang.String date)
          Parse the year number out of a date
 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.
 int isWeekend(java.lang.String date)
          Determines if a date falls on the weekend
 void selectContextMenuByPosition(java.lang.String positionDesc)
          Select a context menu item using the position of the item.
 void selectContextMenuItem(java.lang.String functionCode)
          Select an item from the control's context menu.
 void selectContextMenuItemByText(java.lang.String text)
          Select an item in a context menu based on it's text, optionally with text from parent menu items.
 void selectMonth(int month, int year)
          Selects a given month in a given year.
 void selectRange(java.lang.String from, java.lang.String to)
          Selects a date range.
 void selectWeek(int week, int year)
          Selects a week.
 void setDate(java.lang.String date)
          Sets the date
 void setFirstVisibleDate(Date date)
          Sets the first visible date
 void setFocus()
          Sets the focus.
 void setFocusDate(Date date)
          Sets the focus date
 void setSelectionInterval(Date start, Date end)
          Sets the calendar's selection interval
 void setSelectionInterval(java.lang.String selectionInterval)
          Sets the calendar's selection interval
 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.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
 

Constructor Detail

SAPGuiCalendarTestObject

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


SAPGuiCalendarTestObject

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


SAPGuiCalendarTestObject

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


SAPGuiCalendarTestObject

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


SAPGuiCalendarTestObject

public SAPGuiCalendarTestObject(com.rational.test.ft.object.TestObjectReference obj)
For internal use.

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()

contextMenu

public void contextMenu(int CtxMenuId,                         int CtxMenuCellRow,                         int CtxMenuCellCol,                         java.lang.String DateBegin,                         java.lang.String DateEnd)
Calling this function opens a context menu.

Parameters:
CtxMenuId - Indicates the cell type of the cell in which the context menu was opened: Value Cell Type Description 0 Date Invocation on a cell with a single date 1 Weekday Weekday Invocation on a button for a certain day of the week 2 Week Invocation on a button for a specific week.
CtxMenuCellRow -
CtxMenuCellCol -
DateBegin - SAP date format: YYYYMMDD
DateEnd - SAP date format: YYYYMMDD

createDate

public java.lang.String createDate(int day,                                    int month,                                    int year)
Creates a date string

Parameters:
day -
month -
year -
Returns:

getDay

public int getDay(java.lang.String date)
Parses the day out of a date string

Parameters:
date - SAP date format: YYYYMMDD
Returns:

getMonth

public int getMonth(java.lang.String date)
Parse the month out of a date string

Parameters:
date - SAP date format: YYYYMMDD
Returns:

getWeekday

public java.lang.String getWeekday(java.lang.String date)
Get the textual representation of the day

Parameters:
date - SAP date format: YYYYMMDD
Returns:

getWeekNumber

public int getWeekNumber(java.lang.String date)
Get the integer week number for a date

Parameters:
date - SAP date format: YYYYMMDD
Returns:

getYear

public int getYear(java.lang.String date)
Parse the year number out of a date

Parameters:
date - SAP date format: YYYYMMDD
Returns:

isWeekend

public int isWeekend(java.lang.String date)
Determines if a date falls on the weekend

Parameters:
date - SAP date format: YYYYMMDD
Returns:

selectMonth

public void selectMonth(int month,                         int year)
Selects a given month in a given year.

Parameters:
month -
year -

selectRange

public void selectRange(java.lang.String from,                         java.lang.String to)
Selects a date range.

Parameters:
from - SAP date format: YYYYMMDD
to - SAP date format: YYYYMMDD

selectWeek

public void selectWeek(int week,                        int year)
Selects a week.

Parameters:
week -
year -

setFirstVisibleDate

public void setFirstVisibleDate(Date date)
Sets the first visible date

Parameters:
date -

setFocusDate

public void setFocusDate(Date date)
Sets the focus date

Parameters:
date -

setDate

public void setDate(java.lang.String date)
Sets the date

Parameters:
date - the date in SAP date format: YYYYMMDD

setSelectionInterval

public void setSelectionInterval(Date start,                                  Date end)
Sets the calendar's selection interval

Parameters:
start - the starting date of the interval
end - the ending date of the interval

setSelectionInterval

public void setSelectionInterval(java.lang.String selectionInterval)
Sets the calendar's selection interval

Parameters:
selectionInterval - the selection interval in SAP date format: YYYYMMDD

getToday

public java.lang.String getToday()
Gets today's date

Returns:
SAP date format: YYYYMMDD

selectContextMenuItem

public void selectContextMenuItem(java.lang.String functionCode)
Select an item from the control's context menu.

Parameters:
functionCode -

selectContextMenuItemByText

public void selectContextMenuItemByText(java.lang.String text)
Select an item in a context menu based on it's text, optionally with text from parent menu items.

Parameters:
text -

selectContextMenuByPosition

public void selectContextMenuByPosition(java.lang.String positionDesc)
Select a context menu item using the position of the item. It is therefore independent of the menu item text.

Parameters:
positionDesc - The parameter is a string containing the path to the item. If the context menu item is on the top level menu, this is just the zero-base index of the item. Otherwise, the positions on the menu and respective submenus should be concatenated, separated by "|".

findByName

public TestObject findByName(java.lang.String name,                              java.lang.String type)
Unlike findById, this function does not guarantee a unique result. It will simply return the first descendant matching both the name and type parameters.This is a more natural description of the object than the complex id, but it only makes sense on dynpro objects as most other objects do not have a meaningful name.

Parameters:
name -
type -
Returns:

findById

public TestObject findById(java.lang.String id,                            boolean raiseEx)
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 the function raises an exception unless the optional parameter raise is set to False.

Parameters:
id -
raiseEx -
Returns:

findByNameEx

public TestObject findByNameEx(java.lang.String name,                                long type)
Better performance than FindByName

Parameters:
name -
type -
Returns:

findAllByName

public TestObject[] findAllByName(java.lang.String name,                                   java.lang.String type)
The methods findByName and findByNameEx return only the first object with matching name and type. There may be more than one result returned.

Parameters:
name -
type -
Returns:

findAllByNameEx

public TestObject[] findAllByNameEx(java.lang.String name,                                     long type)
Better performance than FindAllByName

Parameters:
name -
type -
Returns:

setFocus

public void setFocus()
Sets the focus.


dumpState

public TestObject[] dumpState(java.lang.String innerObject)
Dumps the state of the object. Refer to the SAP GUI Scripting Programming API for more information.

Parameters:
innerObject - Used to specify what internal object should be dumped (on supported controls)
Returns:

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: