public class FlexRepeater extends TestObject implements IClickable, IKeyable
Modifier | Constructor and Description |
---|---|
protected |
FlexRepeater(JtfObjectHandle handle,
Desktop desktop)
Creates a new FlexRepeater with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
click()
Clicks on the object.
|
void |
click(int button)
Clicks on the object.
|
void |
click(int button,
Point pos)
Clicks on the object.
|
void |
click(int button,
Point pos,
ModifierKey modifiers)
Clicks on the object.
|
void |
doubleClick()
Double-clicks a mouse button on the object.
|
void |
doubleClick(int button)
Double-clicks a mouse button on the object.
|
void |
doubleClick(int button,
Point pos)
Double-clicks a mouse button on the object.
|
void |
doubleClick(int button,
Point pos,
ModifierKey modifiers)
Double-clicks a mouse button on the object.
|
String |
getAutomationClassName()
Gets a string containing the automation class name for the element.
|
String |
getAutomationIndex()
Gets a string containing the automation index for the element.
|
String |
getAutomationName()
Gets the name that can be used as an identifier for this object.
|
String |
getClassName()
Gets a string containing the class name of the element as assigned by the control developer.
|
List<String> |
getColumnNames()
Gets a list containing the names of all columns in the data.
|
int |
getCount()
Gets the number of times this Repeater should execute.
|
int |
getFirstVisibleRow()
Gets the index of the first visible child.
|
String |
getId()
Gets a string containing the automation identifier (ID) for the element.
|
int |
getLastVisibleRow()
Gets the index of the last visible child.
|
int |
getNumColumns()
Gets the total number of columns in the data available.
|
int |
getNumRows()
Gets the total number of rows of data available.
|
int |
getStartingIndex()
Gets the index into the dataProvider at which this Repeater starts creating children.
|
List<List<String>> |
getValues(int start,
int end)
Returns a matrix containing the automation values of all parts of the components.
|
boolean |
isRecycleChildren()
Gets whether this Repeater should re-use previously created children, or create new ones.
|
void |
mouseMove()
Moves the pointer to the specified location in the object.
|
void |
mouseMove(Point pos)
Moves the pointer to the specified location in the object.
|
void |
pressKeys(String keys)
Presses (but does not release) a set of keys or mouse buttons.
|
void |
pressKeys(String keys,
boolean ensureFocus)
Presses (but does not release) a set of keys or mouse buttons.
|
void |
pressMouse()
Presses (but does not release) a mouse button in the object.
|
void |
pressMouse(int button)
Presses (but does not release) a mouse button in the object.
|
void |
pressMouse(int button,
Point pos)
Presses (but does not release) a mouse button in the object.
|
void |
pressMouse(int button,
Point pos,
ModifierKey modifiers)
Presses (but does not release) a mouse button in the object.
|
void |
releaseKeys(String keys)
Releases a set of keys or mouse buttons.
|
void |
releaseKeys(String keys,
boolean ensureFocus)
Releases a set of keys or mouse buttons.
|
void |
releaseMouse()
Releases a mouse button.
|
void |
releaseMouse(int button)
Releases a mouse button.
|
void |
releaseMouse(int button,
Point pos)
Releases a mouse button.
|
void |
releaseMouse(int button,
Point pos,
ModifierKey modifiers)
Releases a mouse button.
|
void |
typeKeys(String keys)
Sends a set of keystrokes to the object.
|
void |
typeKeys(String keys,
int delay)
Sends a set of keystrokes to the object.
|
void |
typeKeys(String keys,
int delay,
boolean ensureFocus)
Sends a set of keystrokes to the object.
|
void |
typePasswordKeys(String keys)
Types an encrypted password into an object, for example a text field.
|
void |
typePasswordKeys(String keys,
int delay)
Types an encrypted password into an object, for example a text field.
|
void |
typePasswordKeys(String keys,
int delay,
boolean ensureFocus)
Types an encrypted password into an object, for example a text field.
|
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getText, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected FlexRepeater(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the FlexRepeaterdesktop
- the desktop on which this object livespublic void click()
Sample Usage
For example, in order to click on a certain position within a control, type the following:
control.click (MouseButton.LEFT, new Point(244, 16));
The following example uses the left mouse button to click in the center of the control:
control.click ();
click
in interface IClickable
public void click(int button)
Sample Usage
For example, in order to click on a certain position within a control, type the following:
control.click (MouseButton.LEFT, new Point(244, 16));
The following example uses the left mouse button to click in the center of the control:
control.click ();
click
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...public void click(int button, Point pos)
Sample Usage
For example, in order to click on a certain position within a control, type the following:
control.click (MouseButton.LEFT, new Point(244, 16));
The following example uses the left mouse button to click in the center of the control:
control.click ();
click
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...pos
- the coordinates (relative to the object) at which to clickpublic void click(int button, Point pos, ModifierKey modifiers)
Sample Usage
For example, in order to click on a certain position within a control, type the following:
control.click (MouseButton.LEFT, new Point(244, 16));
The following example uses the left mouse button to click in the center of the control:
control.click ();
click
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...pos
- the coordinates (relative to the object) at which to clickmodifiers
- the modifierpublic void doubleClick()
doubleClick
in interface IClickable
public void doubleClick(int button)
doubleClick
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...public void doubleClick(int button, Point pos)
doubleClick
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...pos
- the coordinates (relative to the object) at which to clickpublic void doubleClick(int button, Point pos, ModifierKey modifiers)
doubleClick
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...pos
- the coordinates (relative to the object) at which to clickmodifiers
- the modifierpublic List<List<String>> getValues(int start, int end)
The return value is an array of rows, each of which is an array of items.
start
- the index of the starting child. The default value is 0.end
- the index of the ending child. The default value is 0.public void mouseMove()
mouseMove
in interface IClickable
public void mouseMove(Point pos)
mouseMove
in interface IClickable
pos
- the coordinates (relative to the window) of the new locationpublic void pressKeys(String keys)
Valid keystrokes include:
public void pressKeys(String keys, boolean ensureFocus)
Valid keystrokes include:
public void pressMouse()
pressMouse
in interface IClickable
public void pressMouse(int button)
pressMouse
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...public void pressMouse(int button, Point pos)
pressMouse
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...pos
- the coordinates (relative to the object) at which to press the mousepublic void pressMouse(int button, Point pos, ModifierKey modifiers)
pressMouse
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...pos
- the coordinates (relative to the object) at which to press the mousemodifiers
- the modifierpublic void releaseKeys(String keys)
Valid keystrokes include:
releaseKeys
in interface IKeyable
keys
- the keys or mouse buttons to releasepublic void releaseKeys(String keys, boolean ensureFocus)
Valid keystrokes include:
releaseKeys
in interface IKeyable
keys
- the keys or mouse buttons to releaseensureFocus
- determines whether it should be ensured that the control actually has the keyboard focus. Defaults to true
public void releaseMouse()
releaseMouse
in interface IClickable
public void releaseMouse(int button)
releaseMouse
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...public void releaseMouse(int button, Point pos)
releaseMouse
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...pos
- the coordinates (relative to the object) at which to release the mousepublic void releaseMouse(int button, Point pos, ModifierKey modifiers)
releaseMouse
in interface IClickable
button
- the mouse button to press. Values include: 1=left, 2=right,3=center,...pos
- the coordinates (relative to the object) at which to release the mousemodifiers
- the modifierpublic void typeKeys(String keys)
Valid keystrokes include:
Sample UsageFor example, the following code copies the currently selected text into the clipboard by pressing Ctrl+C:
window.typeKeys ("<Left Ctrl+C>");
public void typeKeys(String keys, int delay)
Valid keystrokes include:
Sample UsageFor example, the following code copies the currently selected text into the clipboard by pressing Ctrl+C:
window.typeKeys ("<Left Ctrl+C>");
public void typeKeys(String keys, int delay, boolean ensureFocus)
Valid keystrokes include:
Sample UsageFor example, the following code copies the currently selected text into the clipboard by pressing Ctrl+C:
window.typeKeys ("<Left Ctrl+C>");
public void typePasswordKeys(String keys)
If the object supports the SetText method, any existing text is cleared before typing the encrypted password.
Sample Usage
Sample Usage
For example, the following code encrypts a string and prints it to the console:
String encryptedPassword = desktop.encrypt("my password"); System.out.println(encryptedPassword);
You can then copy the encrypted password from the console, in this case 6Fk+Bcm+GoXe3X0=
, and use it as follows:
textField.typePasswordKeys("6Fk+Bcm+GoXe3X0=");
typePasswordKeys
in interface IKeyable
keys
- the encrypted passwordpublic void typePasswordKeys(String keys, int delay)
If the object supports the SetText method, any existing text is cleared before typing the encrypted password.
Sample Usage
Sample Usage
For example, the following code encrypts a string and prints it to the console:
String encryptedPassword = desktop.encrypt("my password"); System.out.println(encryptedPassword);
You can then copy the encrypted password from the console, in this case 6Fk+Bcm+GoXe3X0=
, and use it as follows:
textField.typePasswordKeys("6Fk+Bcm+GoXe3X0=");
typePasswordKeys
in interface IKeyable
keys
- the encrypted passworddelay
- the delay between keystrokes in millisecondspublic void typePasswordKeys(String keys, int delay, boolean ensureFocus)
If the object supports the SetText method, any existing text is cleared before typing the encrypted password.
Sample Usage
Sample Usage
For example, the following code encrypts a string and prints it to the console:
String encryptedPassword = desktop.encrypt("my password"); System.out.println(encryptedPassword);
You can then copy the encrypted password from the console, in this case 6Fk+Bcm+GoXe3X0=
, and use it as follows:
textField.typePasswordKeys("6Fk+Bcm+GoXe3X0=");
typePasswordKeys
in interface IKeyable
keys
- the encrypted passworddelay
- the delay between keystrokes in millisecondsensureFocus
- determines whether it should be ensured that the control actually has the keyboard focus. Defaults to true
public String getAutomationClassName()
public String getAutomationIndex()
public String getAutomationName()
public String getClassName()
public List<String> getColumnNames()
public int getCount()
public int getFirstVisibleRow()
public String getId()
public int getLastVisibleRow()
public int getNumColumns()
public int getNumRows()
public boolean isRecycleChildren()
If true, when this Repeater's dataProvider, startingIndex, or count changes, it will recycle the existing children by binding the new data into them. If more children are required, they are created and added. If fewer children are required, the extra ones are removed and garbage collected.
If false, when this Repeater's dataProvider, startingIndex, or count changes, it will remove any previous children that it created and then create and add new children from the new data items.
This property is false by default. Setting it to true can increase performance, but is not appropriate in all situations. For example, if the previously created children have state information such as text typed in by a user, then this state will not be reset when the children are recycled.
public int getStartingIndex()
Copyright 2009-2012 Micro Focus. All Rights Reserved.