Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
XMLExample
XMLExample

Image Added


Table of Contents

XML.

SetNodeValue

UpdateNodeValue

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

from which you want to update the value.

Yes

String

Xpath

Enter the path to the node (

XPath

Xpath) whose value you want to update.

YesString
value

Enter the value which you want to add in the specified node.

YesString

Example: (Refer to the image above.)

XML.

SetNodeValue        

UpdateNodeValue         “C:\Users\Qualitia\

Cust

Actors_List.xml”       

"//

DataSet[@ID='394502re33']/Step/Param[@ParamSeq='4']”         “Qualitia Automation Studio”toc

actors/actor[@id='1']"         “Abraham Kennedy”

If you execute this action in the XML mentioned above, this John Doe will be replaced by Abraham Kennedy.

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.

YesString

strKey

Enter the key name under which you want to store the node value (inner text from the node).

YesString

Example: (Refer to the image above.)

XML.StoreNodeValue         “C:\Users\Qualitia\CustActors_List.xml”        “//DataSet[@ID='106cee8f60']/Step/Param[@ParamSeq='4']”         “Key”

JSON.StoreJsonString

This action reads the specified JSON file, navigates to the specified 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.

XML.StoreAttributeValue

This action reads the XML file and stores the value of the specified attribute under the key. The key value can be retrieved using the key name.

Input Parameters:


Parameter Name

Parameter Description

Mandatory

Data Type

Key_ResultEnter the key name under which you want to store the attribute value.YesString

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 attribute (XPath) from which you want to read and store the value.

YesString

AttributeName

Enter the attribute name whose value you want to store.

YesString

Example: (Refer to the image above.)

XML.StoreAttributeValue         “Key”        “C:\Users\Qualitia\Actors_List.xml”       "//actors/actor"            “id”

In this example above, as there are multiple nodes available under the specified xpath,  value of the first node will be stored under the specified key. 

XML.StoreNodeCount

This action reads the XML file and stores the count of the specified node under the key. The key value can be retrieved using the key name.

Input Parameters:


Parameter Name

Parameter Description

Mandatory

Data Type

Key_NodeCount

Enter the key name under which you want to store the node count.

YesString

XmlFilePath

Enter the absolute path to the XML file from which you want to get and store the node count.

Yes

String

Xpath

Enter the path to the node (XPath) from which you want to store the count. 

YesString

Example: (Refer to the image above.)

XML.StoreNodeCount          “Key”        “C:\Users\Qualitia\Actors_List.xml”       "//actors"

In this example mentioned above, node count of the node actors will be stored in the specified key.

XML.VerifyIfNodeExists

This action reads the XML file and verifies whether the specified node exists in the XML document.

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 existence of the node.

Yes

String

Xpath

Enter the path to the node (XPath) whose existence you want to verify. 

YesString
Existence

Value for this parameter can be either True or False.

  • Set True if you want to check the existence.
  • Set False if you want to check the non-existence.
NoString

Example: (Refer to the image above.)

Xml.VerifyIfNodeExists           “C:\Users\Qualitia\Actors_List.xml”       "//actors/actor"             "True"

This action will verify whether the specified node exists in the XML file.

XML.VerifyIfAttributeExists

This action reads the XML file and verifies whether the specified attribute exists in the XML document.

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 existence of the attribute.

Yes

String

Xpath

Enter the path to the attribute (XPath) whose existence you want to verify. 

YesString
AttributeNameEnter the attribute name whose existence you want to verify.

Existence

Value for this parameter can be either True or False.

  • Set True if you want to check the existence.
  • Set False if you want to check the non-existence.
NoString

Example: (Refer to the image above.)

Xml.VerifyIfAttributeExists                 “C:\Users\Qualitia\Actors_List.xml”         "//actors/actor[@id=1]"       "True"

This action will verify whether the specified ID attribute exists in the XML file.

XML.UpdateAttributeValue

This action reads the specified XML file and updates the inner value of the specified attribute.

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 attribute (Xpath) whose value you want to update.

YesString
AttributeNameEnter the attribute name whose value you want to update.YesString
value

Enter the value which you want to add in the specified attribute.

YesString

Example: (Refer to the image above.)

XML.UpdateAttributeValue         “C:\Users\Qualitia\Actors_List.xml”         "//actors/actor[@id=1]"            "id"              “4”

This action will update the attribute value of the specified attribute to the given value (here 4).

Anchor
JSONExample
JSONExample

Image Added

JSON.StoreValue

This action reads JSON file, navigates to the JSON path, and stores the value of the specified attribute under in 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

Jsonpath

Enter the path to the node (J Path) from which you want to read and store the value.

YesString
strKey

Enter the key name under which you want to store the attribute value.

YesString

Example: Refer to the example above.

JSON.StoreJsonStringStoreValue    “C:\Users\Qualitia\Cust_ListDetails.json”        “$.Customers.Country[0].India”  address.postalCode”         “Key” “PostalCode”

This action will store the value present under the attribute postalCode under the key PostalCode

JSON.

UpdateJsonString

UpdateValue

This action reads the specified JSON file, navigates to the specified JSON path, and sets the specified value to the specified attribute.JSON file and updates the attribute value as per the given parameter.

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 (J Path) to which you want to set the value.

YesString
value

Enter the value which you want to set against the specified attribute.

YesString

Example: Refer to the example above.

JSON.UpdateValue     “C:\Users\Qualitia\Cust_Details.json”        “$.address.postalCode”         “630-0194”

This action will update the value of the attribute postalCode to the value given in the parameter (here 630-0194).

JSON.StoreJsonPathCount

This action stores the count of specified JSON node under the 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 in which you want to set the value.

Yes

String

Jsonpath

Enter the path to the node (J Path) to which you want to set the value.

YesString
value

Enter the value which you want to set against the specified attribute.

YesString

Example: Refer to the example above.

JSON.UpdateJsonStringStoreJsonPathCount    “C “C:\Users\Qualitia\Cust_ListDetails.json”        “$.Customers.Country[0].India”        “Qualitia”address.postalCode”         “630-0194”

This action will update the value of the attribute postalCode to the value given in the parameter (here 630-0194).

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:


AuthenticationType authentication type use when executing the REST request. Qualitia supports two authentication types: Basic and NoAuth.Enter method you want to execute on the specified URLrequestXmlPath the absolute path to file which has REST request related information in the JSON format.Enter the absolute path to the file in which store response

Parameter Name

Parameter Description

Mandatory

Data Type

URLBaseUrl

Enter the service base URL where you want to execute the request.

Yes

String

ApiMethod

Enter the API method you want to execute on the specified URL.

Yes

String

RequestMethodEnter the method you want to YesString

methodName

execute on the API url mentioned above.YesString
RequestJsonFilePath

Enter the absolute path to the file which has REST request related information in the JSON format. In this file, you can enter the details which you want to Put, Push and so forth.

NoString
ResultJsonFilePathEnter the absolute path to the file in which you want to store the REST result.NoString
AuthenticationType

Enter the authentication type you want to use when executing the REST request. Qualitia supports Basic authentication types.

YesString
UserNameEnter the username if the authentication type selected is Basic.NoString
PasswordEnter the password if the authentication type selected is Basic.NoString
RequestHeaderEnter the NoStringresultXmlPathrequest headers you want to pass when executing the REST request. Multiple headers should be separated by semi colon (;).NoString


Example:

REST.ExecuteServiceRequest                “192.122.22.34“localhost:8098/rest/1.0/api/qProjectMapping/project/OAT”     “Basic”      “POST”       “john.doe@gmail.com”  “john.doe@123”  “C”     “POST”              "ProjectMapping/OAT"      “C:\Users\Qualitia\Request-Cust_List.json”        “C:\Users\Qualitia\Response-Cust_List.json”.json”         "Basic"        “john.doe@gmail.com”  “john.doe@123”     "Content-Type=application/x-www-;Authentication=Basic fasdhlsdv"

SOAP.

ExecuteServiceRequest

ExecuteService

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:


AuthenticationTypeEnter the authentication type use when executing the REST request. Qualitia supports two authentication types: Basic and NoAuth.YesUserName the username if authentication type selected is Basic.Enter the resultXmlPath

Parameter Name

Parameter Description

Mandatory

Data Type

URLServiceUrl

Enter the service URL where you want to execute the request.

Yes

String

SoapActionSpecify the method from your SOAP requests which you want to execute here. NoString

methodNameRequestMethod

Enter method you want to execute on the specified URL.

Yes

String

RequestXmlPathEnter the NoString
PasswordEnter the password if the authentication type selected is Basic.NoString
requestXmlPath absolute path to the file which has REST request related information in the JSON format. In this file, you can enter the details which you want to Put, Push and so forth.NoString
ResponseXmlPath

Enter the absolute path to the XML file where the results will be stored.

YesString
requestHeadersEnter the request headers you want to pass when executing the REST request. Multiple headers should be separated by semi colon (;).NoString


Example:

SOAP.ExecuteServiceRequestExecuteService      “http  “localhost:8098/rest/www.dnonline.com/calculator.asmx1.0/api/”      “Basic”      “POST”              "ProjectMapping/OAT"  “Qualitia”     “C  “C:\Users\localadmin\Desktop\SOAPRequest.xml”      “CQualitia\Request-Cust_List.json”        “C:\Users\localadmin\Desktop\SOAPResponse.xml”Qualitia\Response-Cust_List.json”         "Content-Type=application/x-www-;Authentication=Basic fasdhlsdv"