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

Project Version 2.3

com.rational.test.ft.object.interfaces
Interface ITopWindow

All Superinterfaces:
IFrame, IGraphical
All Known Subinterfaces:
IFileDialog, IWindow
All Known Implementing Classes:
BrowserTestObject, ColorDialogTestObject, DialogTestObject, EclipseTestObject, FileDialogTestObject, FTETopLevelTestObject, MessageBoxTestObject, SAPTopLevelTestObject, ShellTestObject, TopLevelSubitemTestObject, TopLevelTestObject, WpfTopLevelSubitemTestObject, WpfTopLevelTestObject

public interface ITopWindow
extends IFrame

Defines the interface for top-level GUI objects. This is needed when keys played back to top-level windows. We always know how to activate top-level windows, but not always know how to activate (set focus) to nested GUI components.

Since:
RFT6.1.1.1
See Also:
IFrame

Field Summary
static java.lang.String INPUTCHARS_METHOD
          The name of the inputChars method.
static java.lang.String INPUTKEYS_METHOD
          The name of the inputKeys method.
 
Method Summary
 void activate()
          Brings the window to top
 void clickDisabled()
          Click on a window that is disabled or waiting on the modal dialog.
 void inputChars(java.lang.String characters)
          Sends the supplied characters to the associated window.
 void inputKeys(java.lang.String keys)
          Sends the supplied characters to the associated window.
 
Methods inherited from interface com.rational.test.ft.object.interfaces.IFrame
close, contextHelp, isIconified, maximize, minimize, move, resize, restore
 
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

INPUTCHARS_METHOD

static final java.lang.String INPUTCHARS_METHOD
The name of the inputChars method.

Detail description:
Use java reflection, the method can be used to send characters to the application under test
Since:
RFT6.1.1.1
See Also:
Constant Field Values

INPUTKEYS_METHOD

static final java.lang.String INPUTKEYS_METHOD
The name of the inputKeys method.

Detail description:
Use java reflection, the method can be used to send key strokes to the application under test
Since:
RFT6.1.1.1
See Also:
Constant Field Values
Method Detail

inputKeys

void inputKeys(java.lang.String keys)
Sends the supplied characters to the associated window.

Throws:
{@link - com.rational.test.ft.BadArgumentException} if the input parameters is null.
Parameters:
keys - java.lang.String The keys to be sent to the current active window
Detail description:
The window is responsible for sending the characters on to the appropriate controls nested in that window. Note that passing in a null string will result in a BadArgumentException being thrown. Strings that do not contain any characters with special meaning are played back as is. For example, if you put "abcd" in a keystring, it plays back as "abcd." The characters with special meanings are:
+^%~(){} The meanings of these special characters are described as follows:

  • Tilde is a special character that is shorthand for the ENTER key:
    ~ Play back an ENTER

  • The following special characters modify the token that follows them:
    + Apply SHIFT to the character that follows immediately
    ^ Apply CONTROL to the character that follows immediately
    % Apply ALT to the character that follows immediately

    For example, the following string plays back "ABCD":
    "+a+b+c+d"

  • You can use parenthesis to group a set of characters on which the same modifier is applied. For example, the following plays back "ABCD":
    "+(abcd)"

  • To play back a character with special meaning (rather than using it for its special meaning), enclose the character in curly braces. For example, the following string plays back "++++":
    "{+}{+}{+}{+}"

  • You can specify a repeat count by enclosing the character in curly braces, followed by a space and then the count. For example, the following plays back "aaaa":
    "{a 4}"

  • To play back only a key-down event for a character, enclose the character in curly braces, followed by a space and then KeyDn. To play back only a key-up event for a character, enclose the character in curly braces, followed by a space and then KeyUp. For example, the following plays back a complete "a" key-press:
    "{a KeyDn}{a KeyUp}"

  • Keys without print representation, for example, backspace, escape, print-screen, and so on, are tool-given names. To play back one of these keys, put its name in curly braces. The names are case-insensitive; for example, you can enter either {TAB} or {tab} and get the same result. Some keys have more than one name; for example, {BACKSPACE} and {BKSP} signify the same key. Following is a list of the names for all the unprintable characters. In this list, synonyms are listed next to each other:

    {CAPSLOCK} {NUMLOCK} {SCROLLLOCK} {ESCAPE} {ESC} {ENTER} {HELP} {PRTSC} {TAB} {BREAK} {CLEAR} {BACKSPACE} {BS} {BKSP} {DELETE} {DEL} {INSERT} {LEFT} {RIGHT} {UP} {DOWN} {PGUP} {PGDN} {HOME} {END} {F1} {F2} {F3} {F4} {F5} {F6} {F7} {F8} {F9} {F10} {F11} {F12} {F13} {F14} {F15} {F16} {APPS} {Win} {LEFTWIN} {RIGHTWIN} {CTRL} {SHIFT} {ALT} {LEFTCTRL} {LEFTSHIFT} {LEFTALT} {RIGHTCTRL} {RIGHTSHIFT} {RIGHTALT} {ExtDelete} {ExtInsert} {ExtLeft} {ExtRight} {ExtUp} {ExtDown} {ExtPgUp} {ExtPgDn} {ExtHome} {ExtEnd} {NumDelete} {NumInsert} {NumLeft} {NumRight} {NumUp} {NumDown} {NumPgUp} {NumPgDn} {NumHome} {NumEnd} {Num} {Num-} {Num/} {Num+} {Num~} {NumEnter} {Num0} {Num1} {Num2} {Num3} {Num4} {Num5} {Num6} {Num7} {Num8} {Num9} {Num.} >

Example:
Send "AB" to a password text field in classicJava application
passwordText().inputKeys("+a+b");
Since:
RFT6.1.1.1

inputChars

void inputChars(java.lang.String characters)
Sends the supplied characters to the associated window. The window is responsible for sending the characters on to the appropriate controls nested in that window. The characters are uninterpreted. For example, inputChars("+a+b") emits "+a+b", in contrast to inputKeys("+a+b"), which interprets the "+" as shift and emit "AB".

Note that passing in a null string will result in a BadArgumentException being thrown.

Parameters:
characters - the characters to be processed by this window
Example:
Send "AB" to a password text field in classicJava application
passwordText().inputChars("AB");
Since:
RFT6.1.1.1

activate

void activate()
Brings the window to top

Detail description:
Causes the associated window control to become the active window if possible. If this action is not possible, an appropriate exception is thrown. Common reasons that the window does not become active are that another window is modal or that the window cannot be displayed.
Example:
Activate the classics java application
classicsJava().activate();
Since:
RFT6.1.1.1

clickDisabled

void clickDisabled()
Click on a window that is disabled or waiting on the modal dialog.

Detail description:
Clicks in a benign location on the top-level object to get other action-sensitive windows to change their state. All actions performed against an inactive window are recorded as a call to this method. Top objects become inactive when a modal dialog box prevents them from becoming active. Actions against an inactive window cause the topmost modal dialog box to be activated, rather than the test object.
Example:
Click on the disabled PlaceOrder dialog in ClassicsJava application.
placeAnOrder(ANY,DISABLED).clickDisabled();
Since:
RFT6.1.1.1