|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WinObject
WinObject represents the generic window element. WinObject element can be created using createWinObject API of IScriptEngine interface. The return value is an instance of WinObject interface. Once WinObject is created, you can play events mentioned below.
Field Summary | |
---|---|
static int |
micLineNext
|
static int |
micLinePrev
|
static int |
micPageNext
|
static int |
micPagePrev
|
static int |
micScrollEnd
|
static int |
micScrollStart
|
static int |
micSetPos
|
Method Summary | |
---|---|
boolean |
accDoDefaultAction()
To execute the default action associated with the accessible UI element using Windows Accessibility |
boolean |
activate()
To activate or bring window to focus |
void |
addAttribute(java.lang.String sAttributeName,
java.lang.String sAttributeValue,
boolean bIgnore,
boolean bValidate,
java.lang.String testParameterName)
Each Web or Window Element has a set of attributes, which are used to find the desired element during execution This method is used to add a attribute to the event |
void |
captureImage(java.lang.String imageFilePath,
boolean overrideExisting)
To capture the window's image |
boolean |
click(int x,
int y)
To simulate click on WinObject |
boolean |
close()
To close window |
boolean |
dblClick(int x,
int y)
To simulate double click on WinObject |
boolean |
deSelect(int index)
To deselect item at specified index in controls like Combobox, listbox etc. |
boolean |
deSelectItem(java.lang.String item)
To deselect specified item in controls like Combobox, listbox etc. |
boolean |
drag(int x,
int y)
To simulate drag on WinObject |
boolean |
dragDrop(int x,
int y,
int displace_x,
int displace_y)
|
boolean |
drop(int x,
int y)
To simulate drop on WinObject |
boolean |
extendSelect(int index)
To select additional item at specified index |
boolean |
extendSelectItem(java.lang.String item)
To select additional specified item |
int |
get_accChildCount()
To get the accessible child count for a given UI element using Windows Accessibility |
java.lang.String |
get_accDescription()
To get the accessible description property using Windows Accessibility |
int |
get_accHeight()
To get the height of the UI element in screen coordinates using Windows Accessibility |
java.lang.String |
get_accHelp()
To get the accessible Help property using Windows Accessibility |
java.lang.String |
get_accKeyboardShortcut()
To get the accessible keyboard shortcut property using Windows Accessibility |
int |
get_accLocationLeft()
To get the left position of the UI element in screen coordinates using Windows Accessibility |
int |
get_accLocationTop()
To get the top position of the UI element in screen coordinates using Windows Accessibility |
java.lang.String |
get_accName()
To get the accessible name property using Windows Accessibility |
java.lang.String |
get_accRole()
To get the accessible role property using Windows Accessibility |
java.lang.String |
get_accState()
To get the accessible State property using Windows Accessibility |
java.lang.String |
get_accValue()
To get the accessible Value property using Windows Accessibility |
int |
get_accWidth()
To get the width of the UI element in screen coordinates using Windows Accessibility |
java.lang.String |
getItem(int index)
To get item at specified index in controls like Combobox, listbox etc. |
java.lang.String[] |
getItems()
To get items in controls like Combobox, listbox, tree etc. |
int |
getItemsCount()
To get items count in controls like Combobox, listbox, tree etc. |
java.lang.String |
getSelectedItem()
To get selected item in controls like Combobox, listbox etc. |
java.lang.String[] |
getSelectedItems()
To get selected items in controls like Combobox, listbox, tree etc. |
java.lang.String |
getText()
To get the text associated with the window, like title. label etc. |
boolean |
hScroll(int option,
int item)
Vertically scrolls an object that has embedded scrollbars |
boolean |
maximize()
To maximise window |
boolean |
minimize()
To minimise window to an icon |
boolean |
mouseMove(int x,
int y)
To simulate mouse move on WinObject |
boolean |
restore()
To restore window to previous size |
boolean |
rightClick(int x,
int y)
To simulate right click on WinObject |
boolean |
select(int index)
To select item at specified index in controls like Combobox, listbox etc. |
boolean |
selectItem(java.lang.String item)
To select specified item in controls like Combobox, listbox etc. |
boolean |
selectRange(int fromindex,
int toIndex)
To select range of items in multi select list box |
boolean |
selectRangeItem(java.lang.String fromitem,
java.lang.String toItem)
To select range of items in multi select list box |
void |
setBreakPoint(boolean bBreakPoint)
This method should be called to set a breakpoint before executing task. |
void |
setIgnored(boolean bIgnore)
This method should be called to ignore a task during execution. |
void |
setImagePath(java.lang.String sImagePath)
This is used to set the event's image path. |
void |
setRecordedWhileShowingSSLCertificate(boolean flag)
This method should be called to mark event as an event on SSL ceritiicate dialog |
void |
setThinkTime(int iThinkTime)
Delay in seconds before the task is actually executed. |
void |
setTitle(java.lang.String sTitle)
This method is used to set the event's title |
boolean |
type(java.lang.String keyBoardInput,
boolean isAlphaNumeric)
Types the specified string in the object |
boolean |
vScroll(int option,
int item)
Horizontally scrolls an object that has embedded scrollbars |
boolean |
wait(java.lang.String propertyName,
java.lang.String propertyValue,
long timeout)
Will make replayer wait till specified property recieves specified value or till the specified time out period, whatever happens earlier |
Methods inherited from interface com.appperfect.devcommon.script.IScript |
---|
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setTimeout |
Field Detail |
---|
static final int micLineNext
static final int micLinePrev
static final int micPageNext
static final int micPagePrev
static final int micScrollEnd
static final int micScrollStart
static final int micSetPos
Method Detail |
---|
boolean accDoDefaultAction()
boolean activate()
void addAttribute(java.lang.String sAttributeName, java.lang.String sAttributeValue, boolean bIgnore, boolean bValidate, java.lang.String testParameterName)
sAttributeName
- name of the attributesAttributeValue
- value of the attributebIgnore
- true
if this attribute should be ignored;
false
otherwise.bValidate
- true
if this attribute should be validated;
false
otherwise.testParameterName
- name of the TestParameter if the attribute value is parameterizedvoid captureImage(java.lang.String imageFilePath, boolean overrideExisting)
imageFilePath
- file path where the image should be saved.overrideExisting
- to decide whether image should be overridden if it already
exists.boolean click(int x, int y)
x
- x corrdinate relative to window's client recty
- y corrdinate relative to window's client rect
boolean close()
boolean dblClick(int x, int y)
x
- x corrdinate relative to window's client recty
- y corrdinate relative to window's client rect
boolean deSelect(int index)
index
- zero based index of the item to be deselected
boolean deSelectItem(java.lang.String item)
item
- item to deselect
boolean drag(int x, int y)
x
- x corrdinate relative to window's client recty
- y corrdinate relative to window's client rect
boolean dragDrop(int x, int y, int displace_x, int displace_y)
x
- x corrdinate relative to window's client recty
- y corrdinate relative to window's client rectdisplace_x
- pixels to move from x locationdisplace_y
- pixels to move from y location
boolean drop(int x, int y)
x
- x corrdinate relative to window's client recty
- y corrdinate relative to window's client rect
boolean extendSelect(int index)
index
- zero based index of the item to be selected
boolean extendSelectItem(java.lang.String item)
item
- to select
int get_accChildCount()
java.lang.String get_accDescription()
int get_accHeight()
java.lang.String get_accHelp()
java.lang.String get_accKeyboardShortcut()
int get_accLocationLeft()
int get_accLocationTop()
java.lang.String get_accName()
java.lang.String get_accRole()
java.lang.String get_accState()
java.lang.String get_accValue()
int get_accWidth()
java.lang.String getItem(int index)
index
- zero based index
java.lang.String[] getItems()
int getItemsCount()
java.lang.String getSelectedItem()
java.lang.String[] getSelectedItems()
java.lang.String getText()
boolean hScroll(int option, int item)
option
- is a pre-defined constant indicating the direction and
increment-type to scroll. Possible values are as follows : 0
Scrolls X lines down, where X is specified by the item
argument 1 Scrolls X lines up, where X is specified by the
item argument 2 Scrolls X pages down, where X is specified by
the item argument 3 Scrolls X pages up, where X is specified
by the item argument 4 Scrolls to the top of Scrollbar 5
Scrolls to the bottom of Scrollbar 6 Scrolls to the position
specified by the item argumentitem
- this value specifies the quantity of lines or pages to scroll
boolean maximize()
boolean minimize()
boolean mouseMove(int x, int y)
x
- x corrdinate relative to window's client recty
- y corrdinate relative to window's client rect
boolean restore()
boolean rightClick(int x, int y)
x
- x corrdinate relative to window's client recty
- y corrdinate relative to window's client rect
boolean select(int index)
index
- zero based index
boolean selectItem(java.lang.String item)
item
- item to select
boolean selectRange(int fromindex, int toIndex)
fromindex
- toIndex
-
boolean selectRangeItem(java.lang.String fromitem, java.lang.String toItem)
fromitem
- toItem
-
void setBreakPoint(boolean bBreakPoint)
bBreakPoint
- true
if breakpoint should be set;
false
otherwise.void setIgnored(boolean bIgnore)
setIgnored
in interface IScript
bIgnore
- true
if this task should be executed;
false
otherwise.void setImagePath(java.lang.String sImagePath)
sImagePath
- file path of the event's image saved on disk.void setRecordedWhileShowingSSLCertificate(boolean flag)
flag
- true
if this event is an event on SSL
ceritiicate dialog; false
otherwise.void setThinkTime(int iThinkTime)
setThinkTime
in interface IScript
iThinkTime
- no of seconds the engine waits before the task is actually
executed.void setTitle(java.lang.String sTitle)
sTitle
- title of the eventboolean type(java.lang.String keyBoardInput, boolean isAlphaNumeric)
keyBoardInput
- A String value. The text string to type.isAlphaNumeric
- is true if text string represents a alphanumeric key, false
otherwise
boolean vScroll(int option, int item)
option
- is a pre-defined constant indicating the direction and
increment-type to scroll. Possible values are as follows : 0
Scrolls X lines forwards, where X is specified by the item
argument 1 Scrolls X lines backwards, where X is specified by
the item argument 2 Scrolls X pages forwards, where X is
specified by the item argument 3 Scrolls X pages backwards,
where X is specified by the item argument 4 Scrolls to the
beginning of Scrollbar 5 Scrolls to the end of Scrollbar 6
Scrolls to the position specified by the item argumentitem
- this value specifies the quantity of lines or pages to scroll
boolean wait(java.lang.String propertyName, java.lang.String propertyValue, long timeout)
propertyName
- name of the element's attribute for which the value should be
fetched.propertyValue
- value of the attribute against which the comparision should be
donetimeout
- in no. of seconds, time period for which the replayer should
wait to get the expected value
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |