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 SAPGuiCtrlGridViewTestObject

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

public class SAPGuiCtrlGridViewTestObject
extends GuiTestObject

Summary for SAPGuiCtrlTextEditTestObject


Field Summary
 
Fields inherited from class com.rational.test.ft.object.interfaces.TestObject
ref
 
Constructor Summary
SAPGuiCtrlGridViewTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject)
          For internal use.
SAPGuiCtrlGridViewTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject, TestObject anchor)
          For internal use.
SAPGuiCtrlGridViewTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject, TestObject anchor, long scriptCommandFlags)
          For internal use.
SAPGuiCtrlGridViewTestObject(TestObject obj)
          Constructs one TestObject from another.
SAPGuiCtrlGridViewTestObject(com.rational.test.ft.object.TestObjectReference ref)
          For internal use.
 
Method Summary
 void clearSelection()
          Removes all row, column and cell selections.
 void click(int row, java.lang.String column)
          Emulates a mouse click on a given cell
 void clickCurrentCell()
          Emulates a mouse click on the current cell.
 void contextMenu()
          Emulates the context menu request.
 void currentCellMoved()
          Notifies the server that a different cell has been made the current cell.
 void deleteRows(java.lang.String rows)
          Deletes the Rows.
 void deselectColumn(java.lang.String column)
          Removes the specified column from the collection of the selected columns.
 void doubleClick(int row, java.lang.String column)
          Emulates a mouse double click on a given cell if the parameters are valid and raises an exception otherwise.
 void doubleClickCurrentCell()
          Emulates a mouse double click on a given cell if the parameters are valid and raises an exception otherwise.
 TestObject[] dumpState(java.lang.String innerObject)
          Dumps the state of the object.
 void duplicateRows(java.lang.String rows)
          Duplicate the rows The parameter rows is a comma separated string of indices or index ranges, for example “3,5-8,14,15”.
 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)
           
 TestObject findByNameEx(java.lang.String name, long type)
          Better performance than FindByName
 boolean getCellChangeable(int row, java.lang.String column)
          Returns True if the specified cell is changeable.
 boolean getCellCheckBoxChecked(int row, java.lang.String column)
          Returns True if the checkbox at the specified position is checked.
 int getCellMaxLength(int row, java.lang.String column)
          Returns the maximum length of the cell in number of bytes.
 java.lang.String getCellType(int row, java.lang.String column)
          This function returns the type of the specified cell.
 java.lang.String getCellValue(int row, java.lang.String column)
          returns the value of the specified cell.
 java.lang.String getColumnName(java.lang.String columnTitle)
          Gets the string identifying a column which is the field name defined in the SAP data dictionary
 int getColumnPosition(java.lang.String column)
          Returns the position of the column as shown on the screen, starting from 1.
 java.lang.String getDisplayedColumnTitle(java.lang.String column)
          Returns the title of the column that is currently displayed.
 int getRowTotalLevel(int row)
          Returns the level of the row.
 boolean getToolbarButtonChecked(int buttonPos)
          Returns True if the button is currently checked (pressed).
 boolean getToolbarButtonEnabled(int buttonPos)
          Indicates if the button can be pressed.
 java.lang.String getToolbarButtonId(int buttonPos)
          Returns the ID of the specified toolbar button, as defined in the ABAP data dictionary.
 java.lang.String getToolbarButtonText(int buttonPos)
          Returns the text of the specified toolbar button.
 java.lang.String getToolbarButtonType(int buttonPos)
          Returns the type of the specified toolbar button.
 void insertRows(java.lang.String rows)
          Inserts the rows The parameter rows is a comma separated text of indices or index ranges, for example “3,5-8,14,15”.
 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.
 void modifyCell(int row, java.lang.String column, java.lang.String value)
          Modify the cell If row and column identify a valid editable cell and value has a valid type for this cell, then the value of the cell is changed.
 void modifyCheckbox(int row, java.lang.String column, boolean checked)
          If row and column identify a valid editable cell containing a checkbox, then the value of the cell is changed.
 void moveRows(int fromRow, int toRow, int destRow)
          The rows with an index greater than or equal to fromRow up to an index less than or equal to toRow are moved to the position of destRow .
 void pressButton(int row, java.lang.String column)
          Emulates pressing a button placed in a given cell.
 void pressButtonCurrentCell()
          emulates pressing a button placed in the current cell.
 void pressColumnHeader(java.lang.String column)
          Emulates a mouse click on the header of the column if the parameter identifies a valid column and raises an exception otherwise.
 void pressEnter()
          Emulates pressing the Enter key.
 void pressF1()
          Emulates pressing the F1 key while the focus is on the gridview.
 void pressF4()
          Emulates pressing the F4 key.
 void pressToolbarButton(java.lang.String id)
          Emulates clicking a button in the grid view’s toolbar.
 void pressToolbarContextButton(java.lang.String id)
          Emulates opening the context menu of the grid view’s toolbar.
 void pressTotalRow(int row, java.lang.String column)
          Pressing the total row button expands or condenses the grouped rows.
 void pressTotalRowCurrentCell()
          Press the expansion button on the current cell.
 void selectAll()
          Selects the whole grid content (i.e.
 void selectColumn(java.lang.String column)
          Adds the specified column to the collection of the selected columns.
 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 selectionChanged()
          Notifies the server that the selection has changed.
 void selectToolbarMenuItem(java.lang.String Id)
          Emulates the selection of an item from the context menu of the grid view’s toolbar.
 void setColumnWidth(java.lang.String column, int width)
          Set the width of a column.
 void setCurrentCell(int row, java.lang.String column)
          Make the cell the current cell.
 void setCurrentCellColumn(java.lang.String column)
          Sets the column of the current cell.
 void setCurrentCellRow(int row)
          Sets the row index of the current cell.
 void setFirstVisibleColumn(java.lang.String column)
          Set the first visible column.
 void setFirstVisibleRow(int row)
          Set the first visible row.
 void setFocus()
          Sets the focus.
 void setSelectedRows(java.lang.String rows)
          Select specified rows.
 void showContextMenu()
          Shows the context menu of the control.
 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

SAPGuiCtrlGridViewTestObject

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


SAPGuiCtrlGridViewTestObject

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


SAPGuiCtrlGridViewTestObject

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


SAPGuiCtrlGridViewTestObject

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


SAPGuiCtrlGridViewTestObject

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

setCurrentCellRow

public void setCurrentCellRow(int row)
Sets the row index of the current cell. It ranges from 0 to the number of rows less 1, with -1 being the index of the title row.


setCurrentCellColumn

public void setCurrentCellColumn(java.lang.String column)
Sets the column of the current cell.


setSelectedRows

public void setSelectedRows(java.lang.String rows)
Select specified rows. The string is a comma separated list of row index numbers or index ranges, such as “1,2,4-8,10”.


getColumnName

public java.lang.String getColumnName(java.lang.String columnTitle)
Gets the string identifying a column which is the field name defined in the SAP data dictionary


setFirstVisibleRow

public void setFirstVisibleRow(int row)
Set the first visible row.

Parameters:
row -

setFirstVisibleColumn

public void setFirstVisibleColumn(java.lang.String column)
Set the first visible column.

Parameters:
column -

setCurrentCell

public void setCurrentCell(int row,                            java.lang.String column)
Make the cell the current cell.

Parameters:
row -
column -

setColumnWidth

public void setColumnWidth(java.lang.String column,                            int width)
Set the width of a column.

Parameters:
column -
width -

selectToolbarMenuItem

public void selectToolbarMenuItem(java.lang.String Id)
Emulates the selection of an item from the context menu of the grid view’s toolbar. The parameter should be the function code of the item.

Parameters:
Id -

selectionChanged

public void selectionChanged()
Notifies the server that the selection has changed.


selectColumn

public void selectColumn(java.lang.String column)
Adds the specified column to the collection of the selected columns.

Parameters:
column -

selectAll

public void selectAll()
Selects the whole grid content (i.e. all rows and all columns).


pressTotalRowCurrentCell

public void pressTotalRowCurrentCell()
Press the expansion button on the current cell.


pressTotalRow

public void pressTotalRow(int row,                           java.lang.String column)
Pressing the total row button expands or condenses the grouped rows. If the selected cell is not a total row cell an exception is raised.

Parameters:
row -
column -

pressToolbarContextButton

public void pressToolbarContextButton(java.lang.String id)
Emulates opening the context menu of the grid view’s toolbar.

Parameters:
id -

pressToolbarButton

public void pressToolbarButton(java.lang.String id)
Emulates clicking a button in the grid view’s toolbar.

Parameters:
id -

pressF4

public void pressF4()
Emulates pressing the F4 key.


pressF1

public void pressF1()
Emulates pressing the F1 key while the focus is on the gridview.


pressEnter

public void pressEnter()
Emulates pressing the Enter key.


pressColumnHeader

public void pressColumnHeader(java.lang.String column)
Emulates a mouse click on the header of the column if the parameter identifies a valid column and raises an exception otherwise.

Parameters:
column -

pressButtonCurrentCell

public void pressButtonCurrentCell()
emulates pressing a button placed in the current cell. It will raise an exception if the cell does not contain a button.


pressButton

public void pressButton(int row,                         java.lang.String column)
Emulates pressing a button placed in a given cell. It will raise an exception if the cell does not contain a button, or does not even exist.

Parameters:
row -
column -

moveRows

public void moveRows(int fromRow,                      int toRow,                      int destRow)
The rows with an index greater than or equal to fromRow up to an index less than or equal to toRow are moved to the position of destRow .

Parameters:
fromRow -
toRow -
destRow -

modifyCheckbox

public void modifyCheckbox(int row,                            java.lang.String column,                            boolean checked)
If row and column identify a valid editable cell containing a checkbox, then the value of the cell is changed. Otherwise, an exception is raised.

Parameters:
row -
column -
checked -

modifyCell

public void modifyCell(int row,                        java.lang.String column,                        java.lang.String value)
Modify the cell If row and column identify a valid editable cell and value has a valid type for this cell, then the value of the cell is changed. Otherwise, an exception is raised.

Parameters:
row -
column -
value -

insertRows

public void insertRows(java.lang.String rows)
Inserts the rows The parameter rows is a comma separated text of indices or index ranges, for example “3,5-8,14,15”. For any single index, a new row will be added at the given index, moving the old row one line down. If a range of indexes is inserted then all the new lines are inserted as one block, before any of the old lines. The entries must be ordered and not overlap, otherwise, an exception is raise.

Parameters:
rows -

getToolbarButtonType

public java.lang.String getToolbarButtonType(int buttonPos)
Returns the type of the specified toolbar button.

Parameters:
buttonPos -
Returns:

getToolbarButtonText

public java.lang.String getToolbarButtonText(int buttonPos)
Returns the text of the specified toolbar button.

Parameters:
buttonPos -
Returns:

getToolbarButtonId

public java.lang.String getToolbarButtonId(int buttonPos)
Returns the ID of the specified toolbar button, as defined in the ABAP data dictionary.

Parameters:
buttonPos -
Returns:

getToolbarButtonEnabled

public boolean getToolbarButtonEnabled(int buttonPos)
Indicates if the button can be pressed.

Parameters:
buttonPos -
Returns:

getToolbarButtonChecked

public boolean getToolbarButtonChecked(int buttonPos)
Returns True if the button is currently checked (pressed).

Parameters:
buttonPos -
Returns:

getRowTotalLevel

public int getRowTotalLevel(int row)
Returns the level of the row.

Parameters:
row -
Returns:

getDisplayedColumnTitle

public java.lang.String getDisplayedColumnTitle(java.lang.String column)
Returns the title of the column that is currently displayed. This text is one of the values of the collection returned from the function “getColumnTitles”.

Parameters:
column -
Returns:

getColumnPosition

public int getColumnPosition(java.lang.String column)
Returns the position of the column as shown on the screen, starting from 1.

Parameters:
column -
Returns:

getCellValue

public java.lang.String getCellValue(int row,                                      java.lang.String column)
returns the value of the specified cell.

Parameters:
row -
column -
Returns:

getCellType

public java.lang.String getCellType(int row,                                     java.lang.String column)
This function returns the type of the specified cell. Possible values are: Normal, Button, Checkbox, ValueList, RadioButton.

Parameters:
row -
column -
Returns:

getCellMaxLength

public int getCellMaxLength(int row,                             java.lang.String column)
Returns the maximum length of the cell in number of bytes.

Parameters:
row -
column -
Returns:

getCellCheckBoxChecked

public boolean getCellCheckBoxChecked(int row,                                       java.lang.String column)
Returns True if the checkbox at the specified position is checked. Throws an exception if there is no checkbox in the specified cell.

Parameters:
row -
column -
Returns:

getCellChangeable

public boolean getCellChangeable(int row,                                  java.lang.String column)
Returns True if the specified cell is changeable.

Parameters:
row -
column -
Returns:

duplicateRows

public void duplicateRows(java.lang.String rows)
Duplicate the rows The parameter rows is a comma separated string of indices or index ranges, for example “3,5-8,14,15”. For any single index a copy of the row will be inserted at the given index. If a range of indexes is duplicated then all the new lines are inserted as one block, before the old lines. The entries must be ordered and not overlap, otherwise an exception is raised.

Parameters:
rows -

doubleClickCurrentCell

public void doubleClickCurrentCell()
Emulates a mouse double click on a given cell if the parameters are valid and raises an exception otherwise.


doubleClick

public void doubleClick(int row,                         java.lang.String column)
Emulates a mouse double click on a given cell if the parameters are valid and raises an exception otherwise.

Parameters:
row -
column -

deselectColumn

public void deselectColumn(java.lang.String column)
Removes the specified column from the collection of the selected columns.

Parameters:
column -

deleteRows

public void deleteRows(java.lang.String rows)
Deletes the Rows. The parameter rows is a comma separated string of indices or index ranges, for example “3,5-8,14,15”. The entries must be ordered and not overlap, otherwise an exception is raised

Parameters:
rows -

currentCellMoved

public void currentCellMoved()
Notifies the server that a different cell has been made the current cell. It must be called whenever the current cell is changed.


contextMenu

public void contextMenu()
Emulates the context menu request.


clickCurrentCell

public void clickCurrentCell()
Emulates a mouse click on the current cell.


click

public void click(int row,                   java.lang.String column)
Emulates a mouse click on a given cell

Parameters:
row -
column -

clearSelection

public void clearSelection()
Removes all row, column and cell selections.


showContextMenu

public void showContextMenu()
Shows the context menu of the control.


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)

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: