This page contains actions that are specific to automate Desktop applications. Also, you can use all the actions defined for General Web Actions.
On this page:
OpenFirefoxBrowser
This action opens a new blank Mozilla Firefox browser.
This action does not have any input parameter.
Example:
OpenFirefoxBrowser
OpenIEBrowser
This action opens a new blank IE browser.
This action does not have any input parameter.
Example:
OpenIEBrowser
CloseAllOpenedFirefoxBrowsers
This action closes all open Firefox browsers on the desktop.
This action does not have any parameters.
Example:
CloseAllOpenedFirefoxBrowsers
CloseAllOpenedIEBrowsers
This action closes all open IE browsers on the desktop.
This action does not have any parameters.
Example:
CloseAllOpenedIEBrowsers
OpenURL
This action opens the specified URL. Qualitia user can specify the browser and browser version in the parameters section to be used when opening URL.
- Ensure that you have enabled UFT on your execution browsers (IE, Firefox, and Google Chrome).
- Ensure the browser version installed on your execution device is compatible with UFT.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Browser Type | Enter the browser name in which you want to open the URL. Parameters can be as follows:
| Yes | String |
URL | Enter the URL to be opened. | Yes | String |
Browser version | Enter the major and minor version of the browser installed on testing machine. For example, if browser version is 54.9.0.3323, then enter only 54.9. | No | String |
Path | This parameter is applicable only when using Google Chrome browser. Enter the absolute path of the chrome.exe from the Google Chrome installed location. | No | String |
Example:
OpenURL “Chrome” “http://www.google.com” “53.8” “C:\Program Files\Google\Chrome\Application\chrome.exe”
When using this action, Qualitia defines its own set of system variables which can be used later when executing test cases. These variables are stored in Qualitia with their expressions (TRUE or FALSE). Following is the list of system variables that Qualitia stores when executing the OpenURL action.
- $$_ISIE: If browser type is set as IE (Internet Explorer), then this expression is stored as TRUE. Here, other two ($$_ISFIREFOX and $$_ISCHROME) are stored as FALSE.
- $$_ISFIREFOX: If browser type is set as FIREFOX (Mozilla Firefox), then this expression is stored as TRUE. Here, other two ($$_ISIE and $$_ISCHROME) are stored as FALSE.
- $$_ISCHROME: If browser type is set as CHROME (Google Chrome), then this expression is stored as TRUE. Here, other two ($$_ISFIREFOX and $$_IE) are stored as FALSE.
Note: It is recommended to close all the unnecessary browsers before starting the test execution or object spying using UFT.
CloseApplication
This action closes the specified application.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Processname | Process Name of the application that is to be closed. | Yes | String |
Example:
CloseApplication "notepad.exe"
ExecuteDDLQueryAndStoreInFile
This action executes data definition queries like select and stores the result set of the fired query. The result set is stored in a CSV file. The action supports and is tested for database Oracle 10g.
Before using this action, ensure that the required database and database drivers are installed. Below is basic information on the oracle drivers and connection with Vbscript.
Oracle10g:
For interacting with the database you would need a driver that is supported in VbScript to interact with Oracle 10 g. One of the drivers can be as follow. The driver would need to be installed before interacting with the database.
- Driver - "Oracle in OraDb10g_home1".
You would need to know the following details as well. - Database Name- is the oracle database to which the user wishes to connect.
- User ID – The username to connect to the database
- Password - The password to connect to the database
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
driver | The driver for the database | Yes | String |
dB | The database name on which the query will be fired | Yes | String |
username | The user name to connect to the database | Yes | String |
password | The password to connect to the database | Yes | String |
query | The query that needs to be executed. This keyword is design such that it can store result set. Hence this keyword is beneficial for SQL queries that can return result set | Yes | String |
filename | The complete path of the file in which the results of the database query is to be stored | Yes | String |
Example:
ExecuteDDLQueryAndStoreInFile "Oracle in OraDb10g_home1" "ORCL" "system" "admin" "Select * from sales_master where id=100" "{Key_SQL13_InwardRegisterControl_ActData_FilePath}"
ExecuteDMLQueryAndStoreInKey
This action executes data manipulation queries like update, delete, and stores the result into a key. This action supports and is tested for database Oracle 10g.
Before using this action, ensure that the required database and database drivers are installed. Below is basic information on the oracle drivers and connection with Vbscript.
Oracle10g:
For interacting with the database you would need a driver that is supported in VbScript to interact with Oracle 10 g. One of the drivers can be as follow. The driver would need to be installed before interacting with the database.
- Driver - "Oracle in OraDb10g_home1".
You would need to know the following details as well. - Database Name- is the oracle database to which the user wishes to connect.
- User ID – The username to connect to the database
- Password - The password to connect to the database
Input Parameters
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
driverString | The driver for the database | Yes | String |
url | The connection string to connect to the database, basically the server address | Yes | String |
username | The user name to connect to the database | Yes | String |
password | The password to connect to the database | Yes | String |
query | The dml query that needs to be executed | Yes | String |
key | The key in which the result of the database query need to be stored | Yes | String |
Example:
ExecuteDMLQueryAndStoreInKey "Microsoft ODBC for Oracle" "Server=localhost" "system" "admin" "Update * from sales_master where id=100" "{Key_Status}"
CalculateDifferenceInDateAndStore
This action stores the difference between two specified dates under the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
strKey | The key in which the difference will be stored. | Yes | String |
interval | It is the expression that you want to use to calculate the differences between from date and to date. Please refer to the Interval section below for more examples of it. | Yes | String |
fromDate | Enter the date from. | Yes | Integer |
toDate | Enter the date to. | Yes | Integer |
Interval: The interval parameter can have the following values:
Parameter | Description |
---|---|
YYYY | Year |
Q | Quarter |
M | Month |
Y | Day of year |
D | Day |
W | Weekday |
WW | Week of year |
H | Hour |
N | Minute |
S | seconds |
Example:
CalculateDifferenceInDateAndStore "Key" "D" "12-Dec-2016" "12-Dec-2027"
NavigateFireFoxBrowser
This action opens the specified URL in the Mozilla Firefox browser. If there is any blank firefox browser on the desktop, uses the same browser, otherwise Qualitia opens a new blank browser and navigates to the URL.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
strURL | Enter the URL to open. | Yes | String |
Example:
NavigateFireFoxBrowser "http://www.google.com"
NavigateIEBrowser
This action opens the specified URL in the Internet Explorer (IE) browser. If there is any blank IE browser on the desktop, uses the same browser, otherwise Qualitia opens a new blank browser and navigates to the URL.
This browser can be used in conjunction with OpenIEBrowser action.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
strURL | Enter the URL to open. | Yes | String |
Example:
NavigateIEBrowser "http://www.google.com"
OpenApplication
This action opens the application with specified path.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
strPath | Enter the absolute path of the application to be opened. | Yes | String |
Example:
OpenApplication "C:\WINDOWS\system32\notepad.exe"
PressKeys
This action sends one or more keystrokes to the active window (as if typed on the keyboard).
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
strKey | Enter the key which you want to press from the key board. | Yes | String |
Example:
To open the Find dialog on the browser, which is done manually using Ctrl + F. While using the PressKeys action, the data to be passed is ~^F where ^ means Control. See the list below for the keys and their meaning).
The action returns 0, if the key is pressed successfully else it will return 1 in any other case.
Note: If a PressKeys action does not execute on an Inactive Screen, refer to PressKeys Action does not Execute on an Inactive Screen.
Important Note:
The data to be passed here is only ^F. However ^ has a special meaning in QAS, it must be preceded with an escape sequence ~. Hence the data passed is written as ~^F.
Make sure to prefix an escape sequence which is a tilda for the following characters which has a special meaning in Qualitia. The characters are {,}, ^, ~
Example:
If key to be sent is {F1}, enter data as ~{F1~}.
To send {TAB}, enter data as ~{TAB~}.
To send {ENTER}, enter data as ~{ENTER~}.
Use the PressKeys action to send keystrokes to applications that have no automation interface. Most keyboard characters are represented by a single keystroke. Some keyboard characters are made up of combinations of keystrokes (CTRL+SHIFT+HOME, for example). To send a single keyboard character, send the character itself as the string argument. For example, to send the letter x, send the string argument "x".
You can use PressKeys to send more than one keystroke at a time. To do this, create a compound string argument that represents a sequence of keystrokes by appending each keystroke in the sequence to the one before it. For example, to send the keystrokes a, b, and c, you need to send as "abc". The PressKeys method uses some characters as modifiers of characters (instead of using their face-values). This set of special characters consists of parentheses, brackets, braces, and the:
- plus sign "+",
- caret "^", (use with an escape character [~])
- percent sign "%",
- and tilde "~"
Enter these characters by enclosing them within braces "{}". For example, to enter the plus sign, enter the string argument "{+}". Brackets "[ ]" have no special meaning when used with PressKeys, but you must enclose them within braces to accommodate applications that do give them a special meaning (for dynamic data exchange (DDE) for example).
- To send bracket characters, enter the string argument "{[}" for the left bracket and "{]}" for the right one.
- To send brace characters, enter the string argument "
}" for the left brace and "{
" for the right one. - To send a key combination that includes Ctrl key such as Ctrl + N send "~^n"
Some keystrokes do not generate characters (such as ENTER and TAB). Some keystrokes represent actions (such as BACKSPACE and BREAK). To send these kinds of keystrokes, enter the associated arguments as shown in the following table:
Key | Argument |
---|---|
BACKSPACE | ~{BACKSPACE~}, ~{BS~}, or ~{BKSP~} |
BREAK | ~{BREAK~} |
CAPS LOCK | ~{CAPSLOCK~} |
DEL or DELETE | ~{DELETE} or ~{DEL~} |
DOWN ARROW | ~{DOWN~} |
END | ~{END~} |
ENTER | ~{ENTER~} or ~ |
ESC | ~{ESC~} |
HELP | ~{HELP~} |
HOME | ~{HOME~} |
INS or INSERT | ~{INSERT~} or ~{INS~} |
LEFT ARROW | ~{LEFT~} |
NUM LOCK | ~{NUMLOCK~} |
PAGE DOWN | ~{PGDN~} |
PAGE UP | ~{PGUP~} |
PRINT SCREEN | ~{PRTSC~} |
RIGHT ARROW | ~{RIGHT~} |
SCROLL LOCK | ~{SCROLLLOCK~} |
TAB | ~{TAB~} |
UP ARROW | ~{UP~} |
F1 | ~{F1~} |
F2 | ~{F2~} |
F3 | ~{F3~} |
F4 | ~{F4~} |
F5 | ~{F5~} |
F6 | ~{F6~} |
F7 | ~{F7~} |
F8 | ~{F8~} |
F9 | ~{F9~} |
F10 | ~{F10~} |
F11 | ~{F11~} |
F12 | ~{F12~} |
F13 | ~{F13~} |
F14 | ~{F14~} |
F15 | ~{F15~} |
F16 | ~{F16~} |
To send keyboard characters that are comprised of a regular keystroke in combination with a SHIFT, CTRL, or ALT, create a compound string argument that represents the keystroke combination. You can do it by preceding the regular keystroke with one or more of the following special characters:
Key | Arguments |
---|---|
Shift | ~+ |
Ctrl | ~^ |
Alt | ~% |
When used this way, these special characters are not enclosed within a set of braces.
To specify that a combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, create a compound string argument with the modified keystrokes enclosed in parentheses. For example, to send the keystroke combination that specifies that the SHIFT key is held down while:
- e and c are pressed, enter the string argument "+(ec)".
- e is pressed, followed by a lone c (with no SHIFT), enter the string argument "+ec".
You can use the PressKeys action to send a pattern of keystrokes that consists of a single keystroke pressed several times in a row. To do this, create a compound string argument that specifies the keystroke you want to repeat, followed by the number of times you want it repeated. To do this, use a compound string argument of the form {keystroke number}. For example, to send the letter "x" ten times, you would send the string argument "~{x 10~}" where you need to ensure that you enter a space between keystroke and number.
- The only keystroke pattern you can send is the kind that is comprised of a single keystroke pressed several times. For example, you can send "x" ten times, but you cannot do the same for "Ctrl+x".
- You cannot automate the PRINT SCREEN key ~{PRTSC~} to an application.
- To send a space, enter the string "
SAPAutoLogon
This action connects and logs on to the designated SAP server.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
ServerDescription | Enter the server details that need to be connected. | Yes | String |
Client | Enter the client details that need to be connected. | Yes | String |
User | Enter the User name to use when connecting to the server. | Yes | String |
Password | Enter the password to use when connecting to the server. | Yes | String |
Language | Enter the 2-digit code to select the language. | Yes | String |
Example:
SAPAutoLogon "Calderone" "4700" "Qualitia" "Password" "EN"
SAPAutoLogonByIP
This action connects and logs on to an SAP server according to its IP address.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
ConnectionString | Enter the connection string that needs to be connected. | Yes | String |
Client | Enter the client details that need to be connected. | Yes | String |
User | Enter the User name to use when connecting to the server. | Yes | String |
Password | Enter the password to use when connecting to the server. | Yes | String |
Language | Enter the 2-digit code to select the language. | Yes | String |
Example:
SAPAutoLogonbyIP "/F/123.132.75.5/S/3200" "4700" "Qualitia" "Password" "EN"
SAPAutoLogonByTargetSystem
This action connects and logs on to an SAP server according to specified target system.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
TargetSystem | Enter the target system that needs to be connected. | Yes | String |
Client | Enter the client details that need to be connected. | Yes | String |
User | Enter the User name to use when connecting to the server. | Yes | String |
Password | Enter the password to use when connecting to the server. | Yes | String |
Language | Enter the 2-digit code to select the language. | Yes | String |
Example:
SAPAutoLogonbyIP "C5P" "3200" "4700" "Qualitia" "Password" "EN"
SAPCloseConnections
This action closes all the existing connections that are open currently.
This action does not have any input parameters.
Example:
SAPCloseConnections
SAPOpenConnection
This action opens the connection to the specified SAP server.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
ServerDescription | Enter the server description that needs to be connected. | Yes | String |
Example:
OpenConnection "Calderone"
SAPOpenConnectionByIP
This action opens a connection to the specified SAP server according to its IP address.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
ConnectionString | Enter the connection string that needs to be connected. | Yes | String |
Example:
OpenConnectionByIP "/F/123.132.75.5/S/3200"
SAPOpenConnectionByTargetSystem
This action opens a connection to the specified SAP server according to its target system.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
TargetSystem | Enter the target system that needs to be connected. | Yes | String |
Example:
OpenConnectionByIP "C5P"
SAPStartBPCATracing
This action begins running the Business Process Change Analyzer to detect changes in a transaction's objects (as compared to the TBOM).
This action does not have any input parameters.
Example:
SAPStartBPCATracing
SAPStopBPCATracing
This action stops the Business Process Change Analyzer.
This action does not have any input parameters.
Example:
SAPStopBPCATracing
StoreObjectInstanceCount
It stores the total number of children of desktop class for the given set of arguments in a given key. Argument key and value should be separated by '=' and multiple key/val pair should be separated by a comma ','.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
ObjectDescription | Specification/property of the object whose instance count is to be stored. | Yes | String |
Key | The key in which count is to be stored. | Yes | string |
Example:
StoreObjectInstanceCount "Class Name=JavaWindow,title=LibrarySystem" "MyObjInstanceCountKey"
StoreSplitString
This action splits the string based on the delimiter specified by the user. Any of the split items can be stored, the particular item that is to be stored the user should provide the index of that item.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
key | The variable in which the specified indexed item of the split string is to be stored | Yes | String |
mainString | The string which is to be split | No | String |
delimiter | The delimiter to be used for splitting | Yes | String |
instance | The index of the item which is to be store after splitting | No | String |
Example:
StoreSplitString "StoreItem" "This is ; a sample ; String" ";" "2 "
StoreSubString
This action stores a substring of a string into a variable. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
key | The variable in which the sub-string is to be stored. | Yes | String |
sourceString | Enter the string whose sub-string value is to be stored. | No | String |
startIndex | Enter the index of the string from where the sub-string is to be fetched. | No | String |
endIndex | The number of characters required in the string. | No | String |
Example:
StoreSubString "resultSubString" "This is a test" "2" "4"
StoreStringLength
Increments the string length by the value specified by the user and stores it into a variable.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
mainstring | A string from which a length will be derived | No | String |
intValue | The value by which the length needs to be incremented. | No | Integer |
Examples:
StoreStringLength "length" "This is a test" "3"
WriteToTextFile
This action allows users to write or append the text in the specified file.
User performing this action should have write access to the corresponding file and folder.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
FilePath | Enter the absolute path to the file in which you want to make changes. | Yes | String |
Text | Enter the content to be overwritten or appended. | No | String |
Mode | Value of this parameter can be OVERWRITE or APPEND. If user keeps mode empty, it will be considered as append. | Yes | String |
Example:
WriteToTextFile "C:\Users\Notepad.txt" "Qualitia" "Append"
Date.StoreModifiedDate
This action modifies the date interval based on the data provided by user and stores the modified date in the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Inputdate | Enter the date to which you want to add the interval. | Yes | String |
Interval | Enter the interval which you want to modify. Value for this parameter can be as follows:
| Yes | String |
Data | Enter the number of intervals you want to add to the input date. The number can be positive for future dates and negative for dates in the past. | Yes | String |
key | Enter the key name under which you want to store the modified date. The key value can be retrieved using the key name. | Yes | String |
Example:
Data.StoreModifiedDate “02/28/2001” “yyyy” “10” “Key”
Post execution, Qualitia will store 02/28/2010 in the key.
Date.ChangeDateFormat
This action modifies format of the date and time based on the format specified by the user and stores the date and time in the modified format under the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Inputdate | Enter the date whose format you want to change. | Yes | String |
Format | Enter the value for the format you want to update the date into. Value for this parameter can be as follows:
| Yes | Integer |
key | Enter the key name under which you want to store the modified date. The key value can be retrieved using the key name. | Yes | String |
Example:
Date.ChangeDateFormat “02/28/2001” “1” “Key”
Post execution, Qualitia will store Monday, February, 2010 in the key.
DB.ExecuteDDLQueryAndStoreInFile
This action executes Data Definition Language (DDL) queries and stores the result set of the fired query in a text file.
Prerequisite:
Before using this action, ensure that the required databases and database drivers are installed.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
DriverString | The DriverString is a combination of driver and database details which helps automation tool to connect to the database. You must provide details in specified format as follows: DRIVER=~{<DriverName>~};Server=<ServerIP/HostName,PortNumber>; Database=<DBName>;UID=<DBUsername>;PWD=<DBPassword> | Yes | String |
Query | The query that needs to be executed. | Yes | String |
FilePath | Enter the absolute path to the file in which you want to store the results. | Yes | String |
Example:
- MySQL:
DB.ExecuteDDLQueryAndStoreInFile “DRIVER=~{MySQL ODBC 5.3 ANSI Driver~};Server=192.168.24.99,1234; Database=ProductInfo;UID=Qualitia; PWD=Qualitia” "select * from productinfo.keyword where keywordid = 'c0ab6ad8f67234b'" "C:\Users\localadmin\Desktop\ProductInfo.txt"
- MS SQL:
DB.ExecuteDDLQueryAndStoreInFile “DRIVER=~{SQL Server~}; Server=192.168.24.99,1234;Database=ProductInfo UID=Qualitia;PWD=Qualitia” "select * from productinfo.keyword where keywordid = 'c0ab6ad8f67234b'" "C:\Users\localadmin\Desktop\ProductInfo.txt"
DB.ExecuteDMLQueryAndStoreinKey
This action executes Data Manipulation Language (DML) queries such as update, delete and so forth and stores the query execution status into the specified key. If the query gets executed successfully, stores 0 and if the query does not get executed, stores 1.
Prerequisite:
Before using this action, ensure that the required databases and database drivers are installed.
If the record set has more than one records, value cannot be stored under the specified key. In such cases, this action fails showing appropriate error logs in the test case execution reports.
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
DriverString | The DriverString is a combination of driver and database details which helps automation tool to connect to the database. You must provide details in specified format as follows: DRIVER=~{<DriverName>~};Server=<ServerIP/HostName,PortNumber>; Database=<DBName>;UID=<DBUsername>;PWD=<DBPassword> | Yes | String |
Query | The query that needs to be executed. | Yes | String |
Key | Enter the key under which you want to store the results. Key value van be retrieved using the key name. | Yes | String |
Input Parameters:
Example:
- MySQL:
DB.ExecuteDMLQueryAndStoreInKey “DRIVER=~{MySQL ODBC 5.3 ANSI Driver~};Server=192.168.24.99,1234; Database=ProductInfo;UID=Qualitia; PWD=Qualitia”
"select * from productinfo.keyword where keywordid = 'c0ab6ad8f67234b'" "ProductInfo"
- MS SQL
DB.ExecuteDMLQueryAndStoreInKey “DRIVER=~{SQL Server~}; Server=192.168.24.99,1234;Database=ProductInfo UID=Qualitia;PWD=Qualitia”
"select * from productinfo.keyword where keywordid = 'c0ab6ad8f67234b'" "ProductInfo"
DB.ExecuteDDLQueryandStoreDatainKey
This action executes Data Definition Language (DDL) queries and stores the result data set in the specified key. In case of finding multiple data sets, this action will fail.
Prerequisite:
Before using this action, ensure that the required databases and database drivers are installed.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
DriverString | The DriverString is a combination of driver and database details which helps automation tool to connect to the database. You must provide details in specified format as follows: DRIVER=~{<DriverName>~};Server=<ServerIP/HostName,PortNumber>; Database=<DBName>;UID=<DBUsername>;PWD=<DBPassword> | Yes | String |
Query | The query that needs to be executed. | Yes | String |
Key | Enter the key under which you want to store the results. Key value van be retrieved using the key name. | Yes | String |
Example:
- MySQL:
DB.ExecuteDDLQueryandStoreDatainKey “DRIVER=~{MySQL ODBC 5.3 ANSI Driver~};Server=192.168.24.99,1234; Database=ProductInfo;UID=Qualitia; PWD=Qualitia”
"select * from productinfo.keyword where keywordid = 'c0ab6ad8f67234b'" "ProductInfo"
- MS SQL:
DB.ExecuteDDLQueryandStoreDatainKey “DRIVER=~{SQL Server~}; Server=192.168.24.99,1234;Database=ProductInfo UID=Qualitia;PWD=Qualitia”
"select * from productinfo.keyword where keywordid = 'c0ab6ad8f67234b'" "ProductInfo"
ChangeCaseAndStore
This action changes the case of the provided string and stores the final value into the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Key | Enter the key name in which you want to store the updated string. | Yes | String |
InputString | Enter the string whose case you want to change. | Yes | String |
Case | Value for this parameter can be as follows:
| Yes | String |
Example:
ChangeCaseAndStore "Key" "Qualitia" "Upper"
StoreStringToInteger
This action converts the provided string to the integer value and stores it into the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Key | Enter the key name in which you want to store integer value. | Yes | String |
Number | Enter the number whose integer value you want to store into the key. | Yes | String |
Example:
StoreStringToInteger "Key" "20"
LaunchApplication
This action runs the application or file from the specified path.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
filePath | Enter the absolute path of the application or file which you want to run or open. | Yes | String |
AppParameters | If the filePath contains path to the executable file, enter the argument here to specify any parameters to be passed while opening the file. | No | String |
AppDirectoryPath | Enter the directory of the application or executable file. | No | String |
Operation | Specify the operation to performe after opening the application. You can specify following operations:
| No | String |
Mode | Enter the mode of the application or file to open. You can specify the integer value from the list below to open application in corresponding mode.
| No | Integer |
Example:
LaunchApplication "C:\Application.exe"
EXCEL.StoreCellData
This action stores the value available in the specified cell. You can then use this data while developing tasks and test cases.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
filePath | Enter absolute path to the Excel file from which you want to get and store the value. | Yes | String |
sheetname | Enter the sheet name from the Excel file from which value is to be stored. | Yes | String |
rowNumber | Enter the row number of the cell from which you want to store the value. | Yes | Integer |
column | Enter the column ID or column name from which you want to store the value in the following format. - Column ID either can be an index number of the column or column header (mentioned at the top of each column, starts from the letter A). For example: to specify 2nd column, use col::2 or col::B. - Column name: Enter the name of the column from which you want to store the value. This name is provided by the user while adding data. | Yes | String |
Key | Enter the key name under which you want to store the value. The key value can be retrieved using the key name. | Yes | String |
Example:
StoreCellData “D:\TrainingStatus.xlsx” “Sheet1” “3” “Col::3” “Key”
EXCEL.WriteToRow
This action adds specified value or a set of values into the specified row of the Microsoft excel file.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
filePath | Enter absolute path to the Excel file. | Yes | String |
sheetname | Enter the sheet name from the Excel file in which you want to add the values. | Yes | String |
RowNumber | Enter the row number in which you want to add the value. | Yes | String |
ColumnID | Enter the column ID or column name in which you want to add the value in the following format. - Column ID either can be an index number of the column or column header (mentioned at the top of each column, starts from the letter A). For example: to specify 2nd column, use col::2 or col::B. - Column name: Enter the name of the column from which you want to store the value. This name is provided by the user while adding data. | Yes | String |
Data | This is the data to be added to the specified Excel row. In case you are statically creating an array, values should be separated by caret (^). | Yes | Array |
Overwrite | Specify whether you want to overwrite the existing data or you want to add another row to add this data. Values for this parameter can be as follows:
| No | String |
Example:
WriteToRow “D:\TrainingStatus.xlsx” “Sheet1” “3” “Col::3” “PASS^PASS^FAIL^WIP” “Current”
EXCEL.WriteToColumn
This action adds specified value or a set of values into the specified column of the Microsoft excel file.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
filePath | Enter absolute path to the Excel file. | Yes | String |
sheetname | Enter the sheet name from the Excel file in which you want to add the values. | Yes | String |
RowNumber | Enter the row number in which you want to add the value. | Yes | String |
ColumnID | Enter the column ID or column name in which you want to add the value in the following format. - Column ID either can be an index number of the column or column header (mentioned at the top of each column, starts from the letter A). For example: To specify the 2nd column, use col::2 or col::B. - Column Name: Enter the name of the column from which you want to store the value. This name is provided by the user while adding data. | Yes | String |
Data | You need to add the data in the specified Excel row. In case you are statically creating an array, values should be separated by caret (^). | Yes | Array |
Overwrite | Specify whether you want to overwrite the existing data or you want to add another row to add this data. Values for this parameter can be as follows:
| No | String |
Example:
WriteToColumn “D:\TrainingStatus.xlsx” “Sheet1” “3” “Col::3” “USER1^ USER2^ USER3^ USER4” “Previous”
EXCEL.StoreColumnCount
This action stores the total number of columns present in the specified sheet of Microsoft Excel.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
filePath | Enter absolute path to the Excel file. | Yes | String |
sheetname | Enter the sheet name from the Excel file from which you want to store the column count. | Yes | String |
ignoreBlankColumn | Specify whether you want to ignore the blank columns while calculation.
| No | String |
Key | Enter the key name under which you want to store the value. | Yes | String |
Example:
Excel.StoreColumnCount “D:\TrainingStatus.xlsx” “Sheet1” “True” “Key”
EXCEL.StoreRowCount
This action stores the total number of rows present in the specified sheet of Microsoft Excel.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Key | Enter the key name under which you want to store the value. | Yes | String |
filePath | Enter the absolute path to the Excel file. | Yes | String |
sheetname | Enter the sheet name from the Excel file from which you want to store the row count. | Yes | String |
ignoreBlankRows | Specify whether you want to ignore the blank rows while calculation.
| No | String |
Example:
Excel.StoreRowCount “D:\TrainingStatus.xlsx” “Sheet1” “True” “Key”
EXCEL.StoreColumnDataOccurance
This action stores the occurrence of the specific value into the specified column.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
filePath | Enter absolute path to the Excel file. | Yes | String |
sheetname | Enter the sheet name from the Excel file in which you want to check for the data. | Yes | String |
ColumnNumber | Enter the column ID or column name in which you want to add the value in the following format. - Column ID either can be an index number of the column or column header (mentioned at the top of each column, starts from the letter A). For example: to specify 2nd column, use col::2 or col::B - Column name: Enter the name of the column from which you want to store the value. This name is provided by the user while adding data. | Yes | String |
Data | You need to add the data in the specified Excel row. In case you are statically creating an array, values should be separated by caret (^). | Yes | String |
Key | Enter the key name under which you want to store the occurrence. | Yes | String |
Example:
Excel.StoreColumnDataOccurrence “D:\TrainingStatus.xlsx” “Sheet1” “True” “Key”
File.CompareFileContents
This action compares two text files and validates whether content inside them is identical.
This action compares only the files with flat structures (like .csv, .txt, .json and so forth).
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
File1 | Enter the absolute path to the source file from which you want to compare the content. | Yes | String |
File2 | Enter the absolute path to the target file with which you want to compare the source file content. | Yes | String |
CaseSensitive | Enter whether you want to consider case-sensitivity when comparing content. Value for this parameter can be True or False.
| Yes | String |
IgnoreWhitespace | Enter whether you want to consider whitespaces when comparing file contents. Value for this parameter can be True or False.
| Yes | String |
Example:
File.CompareFileContents “C:\Users\admin\Downloads\Cust_Info.xlsx” “C:\Users\admin\Downloads\Client_list.xlsx” “False” “True”
FILE.StoreCharacterCount
This action stores the total number of characters present in the specified text file.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
FilePath | Enter the absolute path to the file from which you want to store characters. | Yes | String |
Key | Enter the key name in which you want to store the character count. | Yes | String |
IgnoreWhitespace | Enter whether you want to consider whitespaces when storing character count. Value for this parameter can be True or False.
Note: A space or a tab is counted as one character. | Yes | String |
Example:
FILE.StoreCharacterCount “C:\Users\admin\Downloads\Cust_Info.txt” “Key” “True”
FILE.StoreStringByLineNumber
This action stores data from the specified row of the specified text file in the key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
FilePath | Enter the absolute path to the file from which you want to store data. | Yes | String |
RowNumber | Enter the row number from which you want to get and store the data. | Yes | String |
Key | Enter the key name in which you want to store the data. | Yes | String |
Example:
FILE.StoreStringByLineNumber “C:\Users\admin\Downloads\Cust_Info” “2” “Key”
FILE.VerifyStringExistInFile
This action verifies whether the specified data exists in the specified text file.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
FilePath | Enter the absolute path to the file in which you want to verify data. | Yes | String |
Data | Enter the data which you want to verify in the file. | Yes | String |
CaseSensitive | Enter whether you want to consider case-sensitivity when verifying data. Value for this parameter can be True or False.
| Yes | String |
Example:
FILE.VerifyStringExistInFile “C:\Users\admin\Downloads\Cust_Info” “Qualitia” “True”
File.VerifyFileExist
This action verifies the existence of the specified file at the specified location.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
FilePath | Enter the absolute path to the file which you want to verify. | Yes | String |
Example:
File.VerifyFileExist “C:\Users\admin\Downloads\Cust_List.txt”
File.VerifyFolderExist
This action verifies the existence of the specified folder at the specified location.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
FolderPath | Enter the path to the folder which you want to verify. | Yes | String |
Example:
File.VerifyFolderExist “C:\Users\admin\Downloads\Cust_Info”
TypeKey
This action simulates the keystroke events specified into the parameter.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
KeyboardInput | Enter the keys which you want to simulate. | Yes | String |
This action supports following keystrokes:
To press | Enter |
---|---|
tab key | "Tab" |
enter key | "Enter" |
F1 key | "F1" |
F2 key | "F2" |
F3 key | "F3" |
F4 key | "F4" |
F5 key | "F5" |
F6 key | "F6" |
F7 key | "F7" |
F8 key | "F8" |
F9 key | "F9" |
F10 key | "F10" |
F11 key | "F11" |
F12 key | "F13" |
space key | "Space" |
CapsLock key | "CapsLock" |
delete key | "Delete" |
down arrow key | "Down" |
up arrow key | "Up" |
right arrow key | "Right" |
left arrow key | "Left" |
end key | "End" |
home key | "Home" |
page down key | "Page_Down" |
page up key | "Page_Up" |
shift key | "Shift" |
Example:
TypeKey "Enter"
TypeString
This action simulates the keyboard inputs specified into the parameters.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
StringData | Enter the string which you want to type. | Yes | String |
Example:
TypeString "qualitiasoft.com"
CalculateDifferenceInDateAndStore
This action stores the difference between two specified dates under the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
strKey | The key in which the difference will be stored. | Yes | String |
interval | It is the expression that you want to use to calculate the differences between from date and to date. Please refer to the Interval section below for more examples of it. | Yes | String |
fromDate | Enter the date from. | Yes | Integer |
toDate | Enter the date to. | Yes | Integer |
Interval: The interval parameter can have the following values:
Parameter | Description |
---|---|
YYYY | Year |
Q | Quarter |
M | Month |
Y | Day of year |
D | Day |
W | Weekday |
WW | Week of year |
H | Hour |
N | Minute |
S | seconds |
Example:
CalculateDifferenceInDateAndStore "Key" "D" "12-Dec-2016" "12-Dec-2027"
ComparePattern
This action compares the data passed by user and verifies that it matches the pattern specified by the user.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
pattern | Enter the pattern against which the data specified by the user will be verified. | Yes | String |
data | Enter the data which will be matched against the pattern specified by the user. | No | String |
caseSensitive | Specify the kind of comparison; case-sensitive or case-insensitive.
| No | String |
Example:
Consider a bank application where on adding a user an account number is generated which is unique and consists of alphanumeric characters. The number of characters in that account number is 10 where the first 5 are alphabets and remaining five are numbers.
Suppose the account number is YuIFp96062. If this has to be verified for the pattern mentioned, we can use the action ComparePattern as follows:
- strPattern - [a-z]~{0,5~}[0-9]~{5~}
- strData – YuIFp96062
- blnCase - False
ComparePattern “[a-z]~{0,5~}[0-9]~{5~}“ "YuIFp96062" "false"
Here the ComparePattern action shall verify that data mentioned matched the specified pattern .The action will return 0, if the data matches the specified pattern , else it will return 2 if the data does not match the pattern. In any other case it will return 1.
If the pattern is using Qualitia's special characters like {,},/,^ then they should be prefixed with /.
Special characters and sequences are used in writing patterns for regular expressions. For a complete list of the regular expression syntax visit the VBScript syntax Guide for Regular Expressions.
CompareString
This action compares two strings without trimming the spaces. The comparison can be either case-sensitive / non case-sensitive. Even a key can be passed as one of the parameters for comparison where the CompareString function will retrieve the value from the key and that value will be compared with expected.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
actualString | Enter the string value that you want to compare. You can pass the key name here enclosed in braces. | No | String |
excpectedString | Enter the expected string value against which the actualString will be compared. You can pass the key name here enclosed in braces. | No | String |
caseSensitive | Specify the kind of comparison; case-sensitive or case-insensitive.
| No | String |
CompareString "{key}" "Cancel" "true"
Here the CompareString action shall retrieve the value for the key (here Cancel) and compare it with the expected (here Cancel) with case sensitive comparison as True. The action will return 0, if the strings match else it will return 2 if the strings do not match. It will return 1 in any other case (like an error).
CompareTabularResults
This action compares the database results in two files and displays only the difference in an Microsoft or a kingsoft Excel sheet. A link is generated in the log file. On clicking the link, the excel sheet opens in which the difference in the data is displayed. This action compares the following file types which contain DB results. These files contain the results after executing the queries using the actions "ExecuteQueryAndStoreInFile" or "StoreTableData". The supported file extension types are : txt, xml and xls.
- text and text
- text and excel
- text and xml
- xml and xml
- xml and excel
- excel and excel
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
sourceFile | Enter the source file to be used for the comparison. | Yes | String |
targetFile | Enter the target file against which you want to compare the source file. | Yes | String |
resultFileType | The file type in which the difference between the two results need to be displayed. The file type supported is: | No | String |
Example
CompareTabularResults "C:\DBResults\XML\ORACLE\Result.xml" "C:\DBResults\Excel\ORACLE\Result.xls" "MSExcel"
DoubleClick
This action double clicks at the specified location of the screen or object from the application under test.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
x-coordinate | Enter the x-coordinate of the screen where you want to perform double click. | Yes | Integer |
y-coordinate | Enter the y-coordinate of the screen where you want to perform double click. | No | Integer |
Button | Specify which button of the mouse you want to press while performing the double click action. Valid parameters are left, middle, and right. Default is left. | No | String |
Example:
DoubleClick “233” “342” “Left”
IsArraySorted
This action verifies whether the array is sorted in ascending/descending order.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
array data | The array to be verified for ascending or descending order. | Yes | Array |
datatype | This is the type of data considered for testing. Supported data types are | Yes | String- |
direction | The way the data are to be sorted, i.e. in either ascending or descending. Supported directions are: | No | String |
Example:
IsArraySorted "0^1^4^10" "Integer" "1"
SecureStoreVariable
This action stores the specified value securely by encrypting it under the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
key | The variable under which the string data is to be stored. | Yes | String |
data | Enter the data to be stored in encrypted mode. | No | String |
Example:
SecureStoreVariable "Password" "Encrypt(Abc)"
When the focus is moved away from the data ABC, Qualitia will automatically encrypt the text to "vHpmlfI4R3PQJskt3nuqw==þNWE3ZDdkNjE3N2JmNDM2ODgxMzQwYWI1MTA3YWNjMDc="
VerifyDifference
This action verifies the difference between two integer values and validates it with the expected difference value.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Int1 | Enter the 1st numerical value to compare. You can pass the key name here enclosed in braces. | No | String |
Int2 | Enter the 2nd numerical value to compare. You can pass the key name here enclosed in braces. | No | String |
expectedDifference | Enter the expected difference between the two numbers. | No | String |
Example:
VerifyDifference "30" "40" "10"
VerifyStringContainsValue
This action verifies that the substring is present within the main string. Comparison can either be case sensitive or insensitive.
This action verifies that the substring is present within the main string. Comparison can either be case sensitive or insensitive.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
strMainString | Enter the main string in which you want to search substring. You can pass the key name here enclosed in braces. | No | String |
strSubstring | Enter the 2nd string value that you want to search. You can pass the key name here enclosed in braces. | No | String |
blncase | Specify the kind of comparison; case-sensitive or case-insensitive.
| No | String |
VerifyStringContainsValue "{mainStrKey}" "the action" "True"
Here the VerifyStringContainsValue action shall retrieve the value for the key mainStrKey and compare it with the expected with case sensitive comparison as True.
The action will return 0, if the sub-string is found in the main string, else it will return 2 if the sub-string is not found in the main string. In any other case it will return 1.
Empty and null substrings will not be verified by this action.
IMAGE.CompareTwoImages
This action compares two images. The file extension and resolution of both the images (source and target) should be same, otherwise, the step will fail.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
SourceImagePath | Enter the absolute path to the source image which you want to compare. | Yes | String |
TargetImagePath | Enter the absolute path to the target image with which you want to compare the source image. | Yes | String |
Example:
IMAGE.CompareTwoImages “C:\Users\Qualitia\Cust_Sign.png” “C:\Users\Qualitia\Cust_Logo.png”
StoreSqRoot
This action stores the square root of the specified number under the key. The stored key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Number | Enter the number whose square root you want to store. | Yes | Integer |
Key | Enter the key name under which you want to store the square root. | Yes | String |
Example:
StoreSqRoot "144" "Key"
In this case, the 12 will be stored under key.
StoreStringFromRight
This action stores the specified number of characters from the right side of the given string. The stored key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
InputString | Enter the input string from which you want to store the characters. | Yes | String |
length | Specify the number of characters you want to store under the key name. Enter 0 if you want to store an empty string. | Yes | String |
Key | Enter the key name under which you want to store the specified number of characters. | Yes | String |
Example:
StoreStringFromRight "John Doe" "3" "Key"
In this case, the last three characters i.e. Doe will be stored under the key name.
StoreRandomString
This action generates and stores any random string of the specified length into the key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Key | Enter the key name under which you want to store the random text. | Yes | String |
Length | Specify the number of characters of the string you want to generate and store under the key name. | Yes | Integer |
Example:
StoreRandomString "Key" "23"
StoreRandomAlphanumericString
This action generates and stores any random alphanumeric string of the specified length into the key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Key | Enter the key name under which you want to store the random text. | Yes | String |
Length | Specify the number of characters of the string you want to generate and store under the key name. | Yes | String |
Example:
StoreRandomAlphanumericString "Key" "33"
StoreRandomNumber
This action picks up any random number from the specified range and stores that number in the specified key. The key value can be retrieved using the key name.
Number can be duplicated, if you use this action multiple times in a single test case.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
minNumber | Enter the minimum number. | Yes | String |
maxNumber | Enter the minimum number. | Yes | String |
strKey | Enter the key name under which you want to store the random number. | Yes | String |
Example:
Data.StoreRandomNumber “123” “890” “Key”
StoreStringFromLeft
This action stores the specified number of characters from the left side of the given string. The key value can be retrieved using the key name.
Enter 0 if you want to store the empty string.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
InputString | Enter the input string from which you want to store the characters. | Yes | String |
length | Specify the number of characters you want to store under the key name. Enter 0 if you want to store an empty string. | Yes | Integer |
Key | Enter the key name under which you want to store the specified number of characters. | Yes | String |
ReplaceStringBySubString
This action replaces the specified part from the string with another string and stores the updated value into the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
Key | Enter the key name in which you want to store the updated string. | Yes | String |
InputString | Enter the string that you want to replace. | Yes | String |
Find | Enter the part of the string that need to be replaced. | Yes | String |
Replacewith | Enter the replacement text for the first string. | Yes | String |
Start | Enter the start position. Default is 1. All characters before the start position will be removed. | No | String |
Count | Enter the number of substitutions to perform. Default is -1, which makes all possible substitutions. | No | String |
CaseSensitive | Enter whether you want to consider case-sensitivity when comparing the string before replacement. Value for this parameter can be 0 or 1.
| No | String |
Example:
ReplaceStringBySubString "Key" "Australia" "A" "B" "1" "-1" "0"
XML.SetNodeValue
This action reads the specified XML file and updates the inner value of the specified node.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
xmlFilePath | Enter the absolute path to the XML file in which you want to update the value. | Yes | String |
xPath | Enter the path to the node (X Path) whose value you want to update. | Yes | String |
strValue | Enter the value which you want to add in the specified node. | Yes | String |
Example:
SetNodeValue “C:\Users\Qualitia\Cust_List.xml” “//DataSet[@ID='394502re33']/Step/Param[@ParamSeq='4']” “Qualitia Automation Studio”
XML.StoreNodeValue
This action reads the specified XML file and stores the inner value of the specified node under the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
xmlFilePath | Enter the absolute path to the XML file from which you want to get and store the value. | Yes | String |
xPath | Enter the path to the node (XPath) from which you want to read and store the inner text. | Yes | String |
strKey | Enter the key name under which you want to store the node value (inner text from the node). | Yes | String |
Example:
XML.StoreNodeValue “C:\Users\Qualitia\Actors_List.xml” "//actors/actor[@id="3"]" “ActorName”
If you execute this action in the XML mentioned above, this William Kennedy will be stored under the key name ActorName. You can use the value stored under the ActorName key in the test case execution flow.
JSON.StoreJsonString
This action reads the specified JSON file, navigates to the specified JSON path, and stores the value of the specified attribute under the specified key. The key value can be retrieved using the key name.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
jsonFilePath | Enter the absolute path to the JSON file from which you want to store the value. | Yes | String |
Jpath | Enter the path to the node (J Path) from which you want to read and store the value. | Yes | String |
elementIndx | Enter the index number which results you want to store in the specified key. Index starts from 0. | Yes | Integer |
attributeName | Enter the attribute name whose value you want to save under the specified key. | No | String |
strKey | Enter the key name under which you want to store the attribute value. | Yes | Key |
Example:
JSON.StoreJsonString “C:\Users\Qualitia\Cust_List.json” “$.Customers.Country[0].India” “3” “Name” “Key”
JSON.UpdateJsonString
This action reads the specified JSON file, navigates to the specified JSON path, and sets the specified value to the specified attribute.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
jsonFilePath | Enter the absolute path to the JSON file in which you want to set the value. | Yes | String |
jsonPath | Enter the path to the node (Json Path) to which you want to set the value. | Yes | String |
indx | Enter the index number which results you want to set in the specified value. Index starts from 0. | Yes | Integer |
attributeName | Enter the attribute name against which you want to set the value. | No | Integer |
strValue | Enter the value which you want to set against the specified attribute. | Yes | String |
Example:
JSON.UpdateJsonString “C:\Users\Qualitia\Cust_List.json” “$.Customers.Country[0].India” “3” “Company” “Qualitia”
REST.ExecuteServiceRequest
This action executes the specified REST request. Qualitia gives you provision to store the response at the specified file path location in the JSON format, if required.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
URL | Enter the REST URL where you want to execute the request. | Yes | String |
method | Enter method you want to execute on the specified URL. | Yes | String |
authType | Enter the authentication type you want to use when executing the REST request. Qualitia supports two authentication types: Basic and NoAuth. | Yes | String |
Username | Enter the username if the authentication type selected is Basic. | No | String |
Password | Enter the password if the authentication type selected is Basic. | No | String |
reqFilePath | Enter the absolute path to the file which has REST request related information in the JSON format. | No | String |
resFilePath | Enter the absolute path to the file in which you want to store the REST response in the JSON format. | No | String |
Example:
REST.ExecuteServiceRequest “192.122.22.34:8098/rest/ 1.0/api/qProjectMapping/project/OAT” “POST” “Basic” “john.doe@gmail.com” “john.doe@123”
“C:\Users\Qualitia\Request-Cust_List.json” “C:\Users\Qualitia\Response-Cust_List.json”
SOAP.ExecuteServiceRequest
This action executes the specified SOAP request in the specified XML file. You can also store response in the XML file, if required.
Prerequisites:
In order to execute this action, you should know how to develop request XML for SOAP operations.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
url | Enter the API URL. | Yes | String |
authType | Enter the authentication type you want to use when executing the REST request. Qualitia supports two authentication types: Basic and NoAuth. | No | String |
userName | Enter the username if the authentication type selected is Basic. | No | String |
password | Enter the password if the authentication type selected is Basic. | No | String |
requestType | Enter the request type you want to execute. | Yes | String |
reqXMLPath | Enter the absolute path to the file which has REST request related information in the JSON format. | Yes | String |
methodName | Enter the method name which you want to use when executing the SOAP request. | No | String |
resXmlPath | Enter the absolute path to the XML file where the response will be stored. | No | String |
Example:
SOAP.ExecuteServiceRequest “http://www.dnonline.com/calculator.asmx” “Basic” “Qualitia” “Qualitia” “Post” “C:\Users\localadmin\Desktop\SOAPRequest.xml” “http://abcurl.org/add” “C:\Users\localadmin\Desktop\SOAPResponse.xml”