|
| Window Functions : | Function Index |
Use this function to close all the
application windows (except QEngine window) during playback.
How
to Define:
closeAllWindows()
Example:
Return
Values:
0 for Success
1 for Failure
Function
Description:
Use this function to close any HTML
window with given title. The window details need not present in the GUI
Map file. During playback the window with given title will be searched
and index of the window also will be matched and the window will be
closed.
1st argument - Title of the HTML window
to be closed.
2nd argument - Index of the HTML
window. If there are more than one HTML window with the same
title exists then the window to be closed will be taken based on the
index.
How
to Define:
closeDynamicWindow(window_title,window_index)
Example:
Eg: closeDynamicWindow("AdventNet Payroll
System",1)
In the above example the window with the
title "AdventNet Payroll System" will be searched and will be closed.
Return Values:
0 for Success
1 for Failure
Function
Description:
Using this function you can close
the last opened application browser window.
How
to Define:
closeLastWindow()
Example:
result=closeLastWindow()
displayMessage(result)
Above function call will close the
last
opened application browser window during playback. If it closes the
window properly then it will return 0.
Return Values:
0 for Success
1 for Failure
Use this function to verify whether any
HTML browser window with the given title exist or not. The window
details need not to be present in the GUI map file.
The parameters include:
1st argument - title of the
window to be searched.
2nd argument - Occurence index of the window. Configure this
argument, if there is more than one window with the above given title
exists.
Otherwise, give the
value as 1.- default value is 1.
3rd argument - Inner Frame window details to be matched.
This
argument is optional. If you want to check the inner frame window
then configure the Frame Name or Title as property.
Otherwise, configure it as
"NONE".
4th argument - Value for the above configured
property. If the above property is not configured then configure "NONE"
here.
Note :
If you chosen [Title] for the 3rd argument then in the 4th argument you should give the Title of the frame to be searched for.
If you chosen [Name] for the 3rd argument then in 4th argument you should give the Name of the frame to be searched for.
You can also give "NONE" as title/name,
if your frame does not contain proper name/title.
5th
argument - Occurence index of inner Frame
Window. If there are more than one frame window matches the above
configured inner frame name / title, then configure the index otherwise
leave it as 1.
How
to Define:
doesWindowExists(parent_window_title,
parent_window_index, Title_Or_Name_of_the_frame_window,
Value_of_the_Title_Or_Name_Specified_in_3rd argument,
frame_window_index)
Example:
doesWindowExists("AdventNet",1,"Title","payroll",1)
In the above example, QEngine will search
for the window with title "AdventNet" and Inner frame window with title
"payroll".
If the window exist matching the above criteria "Success" will be
returned.
Return Values:
0 for Success
1 for FailureUsing this function you can verify dialog
(modal / modaless) window with specific title exists or not. The dialog
window details need not present in the GUI map file.
The parameters include:
1st argument - title of dialog window to be searched.
2nd argument
- Inner Window details such as Title
or Name of the inner window to be matched. This is an optional value.
"NONE" can be specified if inner window need not to be matched.
3rd argument - Value for the inner window
details if Title / Name is chosen for the above argument. If "NONE" is
selected, this value also set to "NONE"
4th argument - Index for the window. (If
more than one window with the same name / title present, then the index
can be specified to match the n-th window.
How
to Define:
Example:
doesDialogWindowExists("AdventNet","NONE","NONE",1)
The above example will search for the
dialog with title "AdventNet" and return the result.
Return Values:
0 for Success
1 for FailureFunction
Description:
Use this function to get the
document type (such as HTML or PDF) from the last opened browser window.
How
to Define:
result = getLastWindowDocumentType()
Example:
result=getLastWindowDocumentType()
displayMessage(result)
The above example will get the document
type of the last opened browser window and assign it to the variable
named "result".
Return Value:
String - document type of the last
opened browser window.
Function
Description:
Use this function to retrieve the window
title of the last opened browser window.
How
to Define:
result=getLastWindowTitle()
Example:
result=getLastWindowTitle()
displayMessage(result)
The above example will get the title of
the last opened browser window stores it to the "result" variable.
Return Value:
String - window title of the last
opened browser window.
Function
Description:
Use this function to retrieve the
loaded URL of the last opened browser window.
How
to Define:
result = getLastWindowURL()
Example:
result=getLastWindowURL()
displayMessage(result)
The above example will get the URL loaded
in the last opened browser window.
Return Value:
String - URL of the last opened
browser window.
Function
Description:
Use this function to get the title
of the current
browser window or the window identified using the setWindow() or
setDynamicWindow().
How
to Define:
getWindowTitle()
Example:
result=getWindowTitle()
displayMessage(result)
Return Value:
String - Window title of the window
set through setWindow call.
Function
Description:
Use this function to get the status
displayed in the active window status bar.
How
to Define:
getWindowStatus()
Example:
result=getWindowStatus()
displayMessage(result)
Return Value:
String - Status displayed in the
status bar of the currently active browser window.
Function
Description:
Use this function to get the URL of
the browser
window identified using the setWindow() or setDynamicWindow().
How
to Define:
result = getWindowURL()
Example:
setWindow("AdventNet Payroll System",2)
result=getWindowURL()
displayMessage(result)
Return Value:
String - URL of the window set through setWindow call.
Function
Description:
Use this function to maximize the
window identified through setWindow() or setDynamicWindow().
How
to Define:
minimizeWindow()
Return Value:
0 for Success
1 for Failure
Function
Description:
Use this function to minimize the
window identified through setWindow() or setDynamicWindow().
How
to Define:
maximizeWindow()
Return Value:
0 for Success
1 for Failure
Function
Description:
Use
this function to identify and set the dialog window whose title changes
every time.
This function can be used instead of
setDialogWindow. For setDialogWindow, the window details need to
be present in the GUI map file, where as for setDynamicDialogWindow the
window details need not present in the GUI map file.
If the window is set , this will
return 0 (Success) else 1 (Failure).
The Parameters include:
1st argument - title of the dialog
window to be identified.
2nd argument - Inner frame details such as Title or Name as the property name. Here, Title is the dialog_frame_window_title and Name is the dialog_frame_window_name.
3rd argument - Value of the Title or Name specified in the 2nd argument.
4th argument - Occurence index for the
frame window. Default value is 1.
How
to Define:
setDynamicDialogWindow(dialogtitle,
Title_Or_Name_of_the_frame_window,
Value_of_the_Title_Or_Name_Specified_in_2nd argument,, frameindex)
Example:
setDynamicDialogWindow("AdventNet","Title","payroll",1)
In the above case,
The dialog window with title AdventNet and inner frame with title
payroll will be searched and set.
Return Values:
0 for Success
1 for FailureFunction
Description:
Use this function to identify and set the
browser window for playback whose title changes every time.
This function can be used in place of
setWindow. For setWindow the window details should be present in the
GUI map file, where as, for setDynamicWindow window details need not
present in the GUI map file.
During playback the window will be
identified by matching parent title and frame window title / frame
window name configured for the function.
The parameters include:
1st argument - Main window title
with which the window can be identified.
2nd argument - Occurence of the
main
window to match. Default value is 1. if more than one window
matching the given title exist, then index will be taken to set the
window.
3rd argument - Property to match to set inner frame window. Title or Name as the property name. Here, Title is the frame_window_title and Name is the frame_window_name.
4th argument - Value of the Title or Name specified in the 3rd argument.
5th argument - Ocurence of the
inner
frame window.
How
to Define:
setDynamicWindow(parent_window_title,parent_window_index,frame_window_title
or frame_window_name,value_of_frame_title or
value_of_name,frame_window_index)
Example:
setDynamicWindow("Employee
Details",1,"title","address",1)
In the above case,
The window matching the title "Employee
Details" will be searched and once the window is obtained the inner
frame windows will be iterated to match the window title as "address".
Further actions in the set window should be carried out with the help of fireEventOnElement function.
Return Values:
0 for Success
1 for Failure
Function
Description:
Use this function to set the last opened
window as the window to be accessed for the further playback.
This function takes two optional arguments, Window ID & wait time.
While playing back the script (without
Window ID argument) , one should call dynamic functions to perform
actions over the HTML element in the window.
When playing back the script (With Window
ID argument), one can call recorded actions corresponding to the window
ID given in the setLastWindow call.
How
to Define:
Window_ID = This is optional
argument which enables QEngine to pick up the element details properly
from the appropriate window in the GUI map file. If Window ID is
not provided, you can call dynamic functions for the further playabck
in the window.
wait_time = The maximum time to wait in
seconds until the last opened browser window is identified and loaded.
Example:
result=setLastWindow("AdventNet Payroll System Package",10)
displayMessage(result)
In the above case, the last window opened
will be identified as the window for further playback. The
"AdventNet Payroll System Package" indicates that the elements details
for further actions over the window should be retrieved from this
Window node in the GUI map file.
Return Values:
0 for Success
1 for Failure
Function
Description:
To compare the value of the
specified property of a window object with the given value.
How
to Define:
winCheckInfo("Object ID", "property","value")
ObjectID = Generated by QEngine.
Property = Required Property name to be checked.
Value = Required Property value to be
checked.
Example:
winCheckInfo("The Product
Presentation Team","windowtitle","The Product Presentation Team")
Return Values:
0 for Success
1 for Failure
Function
Description:
To retrieve the value of the
specified property of the selected window.
How
to Define:
result = winGetInfo("Object ID", "property")
ObjectID = generated by QEngine.
Property = Property to be retrieved.
Example:
result=winGetInfo("AdventNet Payroll System Package - Form to Add Employee Details","framecount")
displayMessage(result)
Return Value:
Value of the specified property.
|