General Web Actions

A new version of Qualitia Automation Studio for Web and Mobile 7.2.x is now available. We highly recommend you upgrade. Find more details here.

General Web Actions

OpenURL

This action opens the specified URL in the browser selected under Configuration Settings.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

url

Enter the URL that you want to open.

Yes

String

Example:

OpenUrl                               "http://www.google.com/"

NavigateForward

This action navigates the browser to the next page.

This action does not have any parameter.

Example:

NavigateForward

NavigateBack

This action navigates the browser to the previous page.

This action does not have any parameter.

Example:

NavigateBack

StorePageURL

This action stores the URL of the web page under the specified key. The stored value can be retrieved using the key name. 

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

key

Enter the key name to store URL.

Yes

String

Example:

StorePageURL                   "Key"

StorePageTitle

This action stores the web page title under the specified key. The stored value can be retrieved using the key name. 

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

key

Enter the key name to store page title.

Yes

String

Example:

StorePageTitle                   "Key"

StoreVariable

This action stores a particular string value under the specified key. This value then can be used when developing test cases.  

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

key

Enter the key name to store variable.

Yes

String

data

Enter the value to be stored under the key name.

Yes

String

Example:

StoreVariable                   "url"                     "http://www.bing.com/"  

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.

Yes

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="

On this page:

Loading

SelectPage

This action helps Qualitia users moving focus from one window/page to another as per the test case requirements. 

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

windowName

Enter the name of the window which you want to select. You may use "NULL" to select the main window.

Yes

String

Example:

Select Page                            "Name"

ClosePopUpBrowser

This action closes the popup appeared on the web page. 

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

windowName

Enter the name of the window that you want to close.

Yes

String

Example
ClosePopUpBrowser                   "viewPage"


Loading
Loading
Loading
Loading

Loading
Loading
Loading

Loading

MaximizeBrowser

This action maximizes the browser.

This action does not have any parameter. 

Example:

MaximizeBrowser

Loading
Loading

StoreDateInFormat

This action stores the date provided by the user in a specific format under the key. The key value can be retrieved using the key name.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

date

The date which needs to be stored in the specified format.

Yes

String

Format

Enter the format using which you want to save the date. Use DD for day, MM for month and YYYY for year.

For example: dd/MM/yyyy , MMM/dd/yyyy , dd-MM-yyyy, and so on.
dd = day 
MM = month represented as 01,02,03 etc 
MMM = month represented as Jan. Feb, Mar etc 
yyyy = year

Yes

String

resultFormat

Format in which the date given by the user needs to be stored.

Yes

String

key

Enter the key name under which the new result will be stored.

Yes

String

Example:
StoreDateInFormat                      "30/Jan/2009"                    "dd/MMM/yyyy"               "dd-MMM-yyyy"             "Datekey"

VerifyDates

This action performs comparisons between two dates for various operations (equality, inequality, greater than, less than).

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

startDate

Enter the start date which needs to be verified.

Yes

String

startformat

Enter the format of the start given date.

Yes

String

endDate

Enter the end date which needs to be compared with the start date.

Yes

String

endFormat

Enter the format of the end given date.

Yes

String

operation

Specify the operation to be performed between the first and second dates.

  • Use < to verify that the first date is less than (comes before) the second date.
  • Use > to verify that the first date is greater than (comes after) the second date.
  • Use == to verify that the dates are equal.
  • Use != to verify that the dates are unequal.

Yes

String

Example:

The result of this action shall be true or false depending on the operation performed.

VerifyDates                            "12-Jun-2008"                     "dd-MMM-yyyy"                          "04/12/2008"                      "dd/MM/yyyy"               "<"

Loading

ChangeDateAndStore

This action modifies the day/month/year by the number specified by the user and stores the resulting date under the specified key in the same format as the input date. The key value can be retrieved using the key name.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

date

Enter the date that needs to be updated.

Yes

String

format

Enter the format of the date given by the user.

Yes

String

dayValue

Enter the value by which you want to increase/decrease the day. For example; "1", "-3".

Yes

String

monthValue

Enter the value by which you want to increase/decrease the month. For example; "1", "-3".

Yes

String

yearValue

Enter the value by which you want to increase/decrease the year. For example; "1", "-3".

Yes

String

key

Enter the key name under which the updated date will be stored. 

Yes

String

Example:
To change date from 1st jan 2007 to 15 feb 2007 user can use 2 ways

  1. Increment only the day value
    dayValue = 45, monthValue = 0 , yearValue = 0
    E.g.- ChangeDateAndStore                      "01-01-2007"                 "dd-MM-yyyy"              "45"             "0"               "0"         "key"
  2. Increment the complete date
    dayValue = 14, monthValue = 1 , yearValue = 0
    E.g.- ChangeDateAndStore                      "01-01-2007"                 "dd-MM-yyyy"              "14"             "1"               "0"         "key"

Hence the user can either give the exact end date or can give the no of days, months or years by which the date needs to be changed.

CalculateDifferenceInDatesAndStore

This action calculates the difference in days between the two specified dates and stores the difference under the specified key. The key value can be used using the key name.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

startDate

Enter the start date to compare.

Yes

String

startformat

Enter the date format of the start date.

Yes

String

endDate

Enter the end date to compare.

Yes

String

endFormat

Enter the date format of the end date.

Yes

String

key

Enter the key name under which the difference (in days) will be stored. 

Yes

String

Example:
CalculateDifferenceInDatesAndStore                             "24-Jan-2007"                    "dd-MMM-yyyy"                     "01/26/2007"                      "MM/dd/yyyy            "diffKey"

VerifyDialogExistence

This action verifies if any dialog of the type alert/prompt/confirmation exists on the browser.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

existence

Value of this parameter can be true or false.

  • Set True if you want to check for the presence.
  • Set False if you want to check for the absence.

Yes

String

Example:
VerifyDialogExistence                       "True"

AnswerForNextDialog

This action sets the input as the answer for the next prompt. After setting the answer, webdriver by default may cancel the prompt.

In order to accept and submit your input in the prompt, this action should be used followed by the action "AcceptDialog".

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

answer

Enter the input which you want to set in the next prompt.

Yes

String

Example:

AnswerForNextDialog           "Hello"


Loading

Loading
Loading
Loading

Loading

ExecuteQueryAndStoreInFile

This action executes data manipulation queries like select and stores the result into a file.

The file types supported are xml, xmls and txt. The valid extensions are

  1. For text file - .txt
  2. For xml file- .xml
  3. For excel file- .xls

The databases tested are my sql 5.1, Oracle 10g,MS Access, SQL Server 2008.

Connection to different databases 
1. Mysql: 
a. Driver - "com.mysql.jdbc.Driver" 
b. Connection url - jdbc:mysql://localhost:portNo/databasename?useUnicode=true&characterEncoding=utf8" 
i. Databasename -is the mysql database to which the user wishes to connect 

2. Oracle: 
a. Driver - "oracle.jdbc.driver.OracleDriver" (case-sensitive)
b. Connection url - "jdbc:oracle:thin:@servername or ip:portNo:Databasename
i. Servername -is the name of the server .If the server is on local system, the server name is localhost. If the server is on remote system, the ip address of the remote server can be used. 
ii. portNo – is the port which shall listen the database connections. The default port for oracle is 1521. If the user has configured a specific port for listening, then that port number should be used here. 
iii. Databasename is the oracle database to which the user wishes to connect 

3. SQLServer: 
a. Driver - "com.microsoft.sqlserver.jdbc.SQLServerDriver" 
b. Connection url - "jdbc:sqlserver://servername/ip:port;database=databasename;" 
i. Servername -is the name of the server .If the server is on local system, the server name is localhost. If the server is on remote system, the ip address of the remote server can be used. 
ii. portNo – is the port which shall listen the database connections. The default port for oracle is 1433. If the user has configured a specific port for listening, then that port number should be used here. 
iii. Databasename is the sql server database to which the user wishes to connect 

4. MSAccess using dsn: 
a. Driver - "sun.jdbc.odbc.JdbcOdbcDriver" 
b. Connection url - "jdbc:odbc:dsn_name 
i. dsn_name -is the name of the dsn configured on the system . If multiple users are accessing the same dsn, then it needs to be configured on a shared path instead of local system path.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

Driver

Enter the driver for the database.

Yes

String

url

Enter the connection string to connect to the database.

Yes

String

username

Enter the user name to connect to the database.

Yes

String

Password

Enter the password to connect to the database.

Yes

String

Query

Enter the ddl query that needs to be executed.

Yes

String

File

Enter the absolute path of the file in which the results of the database query need to be stored.

Yes

String

Example
ExecuteQueryAndStoreInFile "oracle.jdbc.driver.OracleDriver" "jdbc:oracle:thin:@localhost:1521:orcl" "scott" "tiger" "select * from test_table where id = 100" "C:\DBResults\XML\ORACLE\Result.xml"

ExecutQueryAndStoreInKey

This action executes data definitions queries like update, delete and stores the result into a key.

Connection to different databases 
1. Mysql: 
a. Driver - "com.mysql.jdbc.Driver" 
b. Connection url - jdbc:mysql://localhost:portNo/databasename?useUnicode=true&characterEncoding=utf8
i. Databasename -is the mysql database to which the user wishes to connect 

2. Oracle: 
a. Driver - "oracle.jdbc.driver.OracleDriver" 
b. Connection url - "jdbc:oracle:thin:@servername or ip:portNo:Databasename
i. Servername -is the name of the server .If the server is on local system, the server name is localhost. If the server is on remote system, the ip address of the remote server can be used. 
ii. portNo – is the port which shall listen the database connections. The default port for oracle is 1521. If the user has configured a specific port for listening, then that port number should be used here. 
iii. Databasename is the oracle database to which the user wishes to connect 

3. SQLServer: 
a. Driver - "com.microsoft.sqlserver.jdbc.SQLServerDriver" 
b. Connection url - "jdbc:sqlserver://servername/ip:port;database=databasename;" 
i. Servername -is the name of the server .If the server is on local system, the server name is localhost. If the server is on remote system, the ip address of the remote server can be used. 
ii. portNo – is the port which shall listen the database connections. The default port for oracle is 1433. If the user has configured a specific port for listening, then that port number should be used here. 
iii. Databasename is the sql server database to which the user wishes to connect 

4. MSAccess using dsn: 
a. Driver - "sun.jdbc.odbc.JdbcOdbcDriver" 
b. Connection url - "jdbc:odbc:dsn_name 
i. dsn_name -is the name of the dsn configured on the system . If multiple users are accessing the same dsn, then it needs to be configured on a shared path instead of local system path.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

Driver

Enter the driver for the database.

Yes

String

url

Enter the connection string to connect to the database.

Yes

String

username

Enter the user name to connect to the database.

Yes

String

Password

Enter the password to connect to the database.

Yes

String

Query

Enter the dml query that needs to be executed.

Yes

String

key

Enter the key in which the result of the database query need to be stored.

Yes

String

Example:
ExecuteQueryAndStoreInKey "oracle.jdbc.driver.OracleDriver" "jdbc:oracle:thin:@localhost:1521:orcl" "scott" "tiger" "delete from test_table where id = 100" "Resultkey"

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.

  1. text and text
  2. text and excel
  3. text and xml
  4. xml and xml
  5. xml and excel
  6. excel and excel

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

firstFile

The complete location of the first file to be compared

Yes

String

secondFile

The complete location of the second file to be compared

Yes

String

resultFileType

The file type in which the difference between the two results need to be displayed. The file type supported is: 
MSExcel 

No

String

Example
CompareTabularResults             "C:\DBResults\XML\ORACLE\Result.xml"                 "C:\DBResults\Excel\ORACLE\Result.xls"                     "MSExcel"

ComputeExpression

This action evaluates mathematical, relational, logical operations and stores the result under the specified key. The key value can be retrieved using the key name.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

expression

The expression to be evaluated

Yes

String

strKey

The key under which the result of the evaluation will be stored.

Yes

String

Example:

Mathematical Expression
ComputeExpression                "24*2+4"              "Result"

Example:

Relational Expression
ComputeExpression               "10*2<30"             "Result"

Example:

Logical Expression
ComputeExpression             "10*2+1>19&10*2+2<23'"     "Result"

CompareArray

This action compares two arrays for equality.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

firstArray

The first array whose items are separate by carat (^) operator.

No

Array

secondArray

The second array whose items are separate by carat (^) operator.

No

Array

match

This parameter specifies the type of comparison to be done. It can be one of the following: 

  • Exact – This will compare the items of the array for exact match that is size of the two arrays should match. The sequence in which the items occur in the arrays should match. This is a one to one comparison. 
  • Partial- This compares if the second array is a sub-list of the first. The sub-list items in the second array need not be in the same sequence as they appear in the first array. However, it is not vice versa, that is, it will not check if the first array is a sub-list of the seconds array. In this case, the action will fail.

No

String

Example :
CompareArray "1^2^3^4" "1^2^3^4"             "exact"
CompareArray "1^2^3^4^5^6" "2^1^3^4"      "partial"

StoreWindowHandle

This action fetches the handle (identifier) of a window and stores under the specified key.  This key can the be used in action like SelectPage and ClosePopupBrowser to work on the specific page. This action can be used when the name of the window on which user needs to work on is not known.

Also, this action will have to be used immediately after every action which results in opening a new window. Only then user will be able to work on the new opened window. Thus, immediately after every action which opens a new window, this action will have to be used in order to fetch the identifier of the new window.

This action has to be used for every window of the application. For more information about this, please refer to the knowledge base here

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

strKey

The key on which the handle of the window need to be stored

Yes

String

Example : 
Object1                                   Click 
StoreWindowHandles            "new window" 
SelectPage                              "{new window}" 
EditObjectOnNewPage           Set                 Testing 
In the example above, on clicking on object1 a new window is opened on which actions need to be performed.

Use the action StoreWindowHandles to fetch the handle of the new window opened. Use the SelectPage action to select the window. Then user can work on an object present on the new page.

Also, when the action OpenUrl is used, user will have to store the handle on this main application window.

Example:

OpenUrl                                 "http://www.google.com"
StoreWindowHandle            "mainapplicationWindow"

ExitTask

This action skips the execution of the next step and continue executing the next task. 

This action is not available for test case level step.

This action does not have any parameter.

Example:

ExitTask

ExitTCIteration

This action skips the execution of the current iteration of test case and execute next iteration. In case of a single TC Iteration the test case execution will stop.

This action does not have any parameter.

Example:

ExitTCIteration

ExitSuite

This action stops the execution of the test suite and no further test cases will be executed.

This action does not have any parameter.

Example:

ExitSuite

VerifyLinkOnPage

This action verifies if there is any hyperlink exists on the page.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

Link

The locator of the link to be verified. This is the inner text of the link.

Yes

String

Example:
VerifyLinkOnPage                    "AdvancedSearch"


Loading

Loading
Loading

Loading

WaitForPageToLoad

This actions waits for the page to load for the specified number of seconds. If the wait time is "" then the wait time value is taken from the "Sync Time" set under the Qualitia Configuration (Execution) window. 

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

waitTime

Enter the number of seconds to wait.

Yes

String

Example:
WaitForPageToLoad                        "10"

In Webdriver, we wait for the object to come in ready state. If it is in ready state it is assumed that the page is loaded completely and Webdriver will stop waiting. The condition to wait till the object is in ready state and assume that the page is loaded could however not work as expected at all times.

RefreshPage

This action simulates the refresh operation on the currently selected page.

This action does not have any parameter. 

Example:

RefreshPage

DeleteCookiesOnCurrentDomain

This action deletes all the cookies that are visible to the current domain. 

This action does not have any parameter. 

If the page is www.google.co.in and the user runs the above action, then all the cookies created by www.google.co.in will be deleted.

If there is a link in www.google.co.in and on clicking, it navigates to www.apple.com.

Again , when the user runs the above action, then all the cookies create by www.apple.com will be deleted.

Reiterating, to delete www.google.co.in cookies, the application needs to be in www.google.co.in domain.

This action will automatically, pick up the current domain and will delete cookies of that domain. The user just needs to make sure that he runs this action only in the domain for which the cookies are to be deleted.

Note: In HTML, due to security reasons, the only website that can read/delete a cookie is the one that creates it.

Example:
DeleteCookiesOnCurrentDomain

AcceptDialogAndStoreMessage

This action accepts the dialog appeared on the Web page and stores the message under the specified key. 

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

Key

Enter the key in which the message will be stored.

Yes

String

Example:
AcceptDialogAndStoreMessage                  "AlertMessage"

WriteToBuildProperty

This action writes a user defined property along with its value to qer.properties file. This customized information can be used in email notifications sent by Jenkins provided all the required email specific settings are done there in Jenkins.

Input Parameters:

Parameter Name

Parameter Description

Mandatory

Data Type

propertyName

Property name to be written in qer.properties file

Yes

String

propertyValue

Property value to be written in qer.properties file

Yes

String

Example:
WriteToBuildProperty             "propertyName"                 "propertyValue"

NoOps

This is a placeholder action and cannot be executed. Qualitia selects this action for the steps present under the activity when auto-populating test case.

You are requested to replace this action with Qualitia executable action.

This action does not have any parameter. 

When executing test cases with this action, test cases will be failed to notify Qualitia users about replacing such actions.

Not finding what you need?