|
| Default Functions : | Function Index |
Description : Default functions are the
one gets recorded during recording the web application. These functions
needed not inserted into the script through Function Generator.
Following are the functions that are recorded through QEngine recorder :
|
|
These functions initialize playback with needed object repository to use for the playback of the script. |
Function Description:
Use this function to notify playback engine
to load the local script map file as object repository for the current
playback session. The local repository will be present under
webscripts/<script_name>/ <script_name>.map.
How to Define:
useLocalMapFile() - initializes
<script_name>.map file as object repository.
Example:
useLocalMapFile()
Return
Values:
0 for Success
1 for Failure
Function
Description:
Use this function to notify playback
engine to load the object repository global to the suite. The suite
level map file will be present under conf/global.map.
How to Define:
useSuiteLevelMapFile() - initializes
global.map file as object repository.
Example:
useSuiteLevelMapFile()
Return
Values:
0 for Success
1 for Failure
|
|
These functions used to load the intended web
application URL in the browser. |
Function
Description:
This function launch a new browser with
the given URL.
How to Define:
launchApplication("<Web_Application_URL>")
- launches new browser window with given URL
Web_Application_URL - Web application URL to be loaded in
the browser
Example:
launchApplication("http://www.zoho.com")
Return
Values:
Function
Description:
This function loads the given URL in the
already launched window after the recorded think time.
How to Define:
changeURL("<Web_Application_URL>",<think_time_in_secs>)
Web_Application_URL - Web
application URL to be loaded in
the browser
think_time_in_secs - think
time
taken by the user while recording in seconds.
Example:
changeURL("http://www.zoho.com",2)
Return
Values:
Function
Description:
This function is used to click the
browser toolbar button such as Back, Forward, Refresh, Home.
How to Define:
clickMainToolBarButton("<Button_Name>",<think_time_in_secs>)
Button_Name - Name
of the button whether Back / Forward / Refresh / Home
think_time_in_secs
- time taken by the user while
recording in seconds
Example:
clickMainToolBarButton("Back",1)
Return
Values:
|
|
These functions used to set appropriate
window document over which the further playback happen. Think Time included in the every script
function indicates the time taken by the user while recording the
application. The unit of think time is seconds. If the Fast Mode is chosen then think time
recorded will be ignored and minimum of 1 secs will be used between
consecutive script action. |
Function
Description:
This function sets the window document
identified through parent title, window title and window name for the
further script playback. The script actions will be performed over the
window document identified by the given window title.
How to Define:
setWindow("<Window_ID>",<think_time_in_secs>)
Window_ID - ID for the window element properties as stored
in the Map File.
think_time_in_secs - time taken by
the user before performing the action in seconds.
Example:
setWindow("Zoho - Online
office
Productivity Application",2)
Return
Values:
Function
Description:
This function will close the window
identified through the parent title, window title and window name.
How to Define:
closeWindow("<Window_ID>",<think_time_in_secs>)
Window_ID - ID for the window element properties as stored
in the Map File.
think_time_in_secs - time taken by
the user before performing the action in seconds.
Example:
closeWindow("Zoho - Online
office
Productivity Application",2)
Return
Values:
Function
Description:
This
function sets the popup window document identified through
window title for the further script playback.
How to Define:
setAlertWindow("<Window_ID>",<think_time_in_secs>)
Window_ID - ID for the window element properties as stored
in the Map File.
think_time_in_secs - time taken by
the user before performing the action
in seconds.
Example:
setAlertWindow("Windows Internet
Explorer",2)
Return
Values:
Function
Description:
This function will close the popup window
identified through the window title.
How to Define:
closeAlertWindow("<Window_ID>",<think_time_in_secs>)
Window_ID - ID for the window element properties as stored
in the Map File.
think_time_in_secs - time taken by
the user before performing the action
in seconds.
Example:
closeAlertWindow("Windows Internet
Explorer",2)
Return
Values:
Function
Description:
This
function sets the popup dialog window document identified through
window title for the further script playback. This function will work
for both modal and modalless dialog windows.
How to Define:
setDialog("<Window_ID>",<think_time_in_secs>)
Window_ID - ID for the window element properties as stored
in the Map File.
think_time_in_secs - time taken by
the user before performing the action
in seconds.
Example:
setDialog("Zoho - Dialog",2)
Return
Values:
Function
Description:
This function will close the popup dialog
window identified through the window title.
How to Define:
closeDialog("<Window_ID>",<think_time_in_secs>)
Window_ID - ID for the window element properties as stored
in the Map File.
think_time_in_secs - time taken by
the user before performing the action
in seconds.
Example:
closeDialog("Zoho - Dialog",2)
Return
Values:
|
|
These functions used to perform actions over
the form elements such as text field, button, link etc., The
actions will be performed over the document set by the setWindow call. The element identification properties change
can be dynamically substituted in the below functions to facilitate
proper identification of the element in the web page. Think Time included in the every script function indicates the time taken by the user while recording the application. The unit of think time is seconds. If the Fast Mode is chosen then think time recorded will be ignored and minimum of 1 secs will be used between consecutive script action. |
Function
Description:
This function is used to set the given
text in the text field / text area.
How to Define:
setText("<Object_ID>","<Value_to_be_set>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
Value_to_be_set - Value
that needs to be set in the text field
think_time_in_secs - time taken by
the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
setText("<Object_ID>","<Value_to_be_set>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
setText("username","qengine",2)
Return
Values:
Function
Description:
This function is used to click the
button. Following are the types of button over which it will perform
click action,
How to Define:
clickButton("<Object_ID>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
think_time_in_secs - time taken by
the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
clickButton("<Object_ID>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
clickButton("login",2)
Return
Values:
Function
Description:
This function is used to perform click
action over an image element. Following are the elements over which it
can perform click action,
How to Define:
clickImage("<Object_ID>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
think_time_in_secs - time taken by
the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
clickImage("<Object_ID>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
clickImage("http://www.zoho.com/images/logo.gif",2)
Return
Values:
Function
Description:
This
function is used to select an item from the select combo box. To select
multiple items provide the items with ":-:"
as separator.
How to Define:
selectItem("<Object_ID>","<Item_to_select>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
Item_to_select - Item to
be set selected in the select combo.
think_time_in_secs - time taken by the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
selectItem("<Object_ID>","<Item_to_select>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
selectItem("department","HR",2)
Multiple Item Selection
selectItem("department","HR:-:Accounts",2)
Return
Values:
Function
Description:
This
function is used to perform click action over an anchor element.
How to Define:
clickLink("<Object_ID>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
think_time_in_secs - time taken by
the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
clickLink("<Object_ID>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
clickLink("Zoho",2)
Return
Values:
Function
Description:
This
function is used to perform click action over table cell or SPAN
element.
Following are the elements over which it can perform click action,
How to Define:
clickElement("<Object_ID>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
think_time_in_secs - time taken by
the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
clickElement("<Object_ID>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
clickElement("Personal
Details",2)
Return
Values:
Function
Description:
This
function is used to perform click action over the LI and DIV elements.
Following are the elements over which it can perform click action,
The HTML menu's are
created using DIV / LI.
How to Define:
clickList("<Object_ID>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
think_time_in_secs - time taken by
the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
clickList("<Object_ID>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
clickList("File",2)
Return
Values:
Function
Description:
This
function is used to perform click action over the AREA element.
In an image element some area specified through the co-ordinates in the
AREA element can have diffferent links. The Area constructed with
co-ordinates can be clicked through using QEngine.
How to Define:
clickMap("<Object_ID>","<Co-ordinates>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
Co-ordinates -
Co-ordinates of the specified in AREA element.
think_time_in_secs - time taken by the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
clickMap("<Object_ID>","<Co-ordinates>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
clickMap("Map","535,175,564,198",2)
Return
Values:
|
|
The actions such as rightclick, doubleclick
can be performed over the form elements. |
Function Description:
This
function is used to perform right click action over the given HTML
element. This can fire right click event over any form elements.
How to Define:
showContextMenu("<Object_ID>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
think_time_in_secs - time taken by the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
showContextMenu("<Object_ID>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
showContextMenu("File",2)
Return
Values:
Function Description:
This
function is used to perform double click action over the given HTML
element. This can fire right click event over any form elements.
While recording the action will be recorded as two consecutive click
actions. You have to remove one click event and change the other click
action as doubleClick.
How to Define:
doubleClick("<Object_ID>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
think_time_in_secs - time taken by the user while recording in seconds.
If the any of the
identification property of the element changes dynamically, then there
is a provision to substitute the changed property alone using the below
function call,
doubleClick("<Object_ID>",<think_time_in_secs>,"<name_of_changed_property>","<Changed_Property_Value>")
Example:
doubleClick("File",2)
Return
Values:
Function Description:
To select the item in the dropdown list based on the specified index value.
How to Define:
selectItemWithIndex("<Object_ID>","<Option_index>",<think_time_in_secs>)
Object_ID - ID for the
element as linked in the Map File.
Option_index - item index of the option in the combo box.
think_time_in_secs - time taken by the user while recording in seconds.
Example:
result =selectItemWithIndex("department_1",5,1)
Return Values:
0 for Success
1 for Failure
|
|
This function will invoke the testcase to
validate the configured criteria of the web page. |
Function Description:
This
function executes the testcase associated with the given testcase id.
The testcase can be any of HTML / DB testcase.
How to Define:
executeTest("<Testcase_id>")
Testcase_id - ID of the
testcase with which the configured validation criteria are associated.
Example:
executeTest("Test-001")
Return
Values:
|