XML.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 from which you want to update the value. | Yes | String |
Xpath | Enter the path to the node (Xpath) whose value you want to update. | Yes | String |
value | Enter the value which you want to add in the specified node. | Yes | String |
Example: (Refer to the image above.)
XML.UpdateNodeValue “C:\Users\Qualitia\Actors_List.xml” "//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. | Yes | String |
strKey | Enter the key name under which you want to store the node value (inner text from the node). | Yes | String |
Example: (Refer to the image above.)
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.
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_Result | Enter the key name under which you want to store the attribute value. | Yes | String |
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. | Yes | String |
AttributeName | Enter the attribute name whose value you want to store. | Yes | String |
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. | Yes | String |
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. | Yes | String |
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. | Yes | String |
Existence | Value for this parameter can be either True or False.
| NoYes | String |
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. | Yes | String |
AttributeName | Enter the attribute name whose existence you want to verify. | Yes | |
Existence | Value for this parameter can be either True or False.
| NoYes | String |
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. | Yes | String |
AttributeName | Enter the attribute name whose value you want to update. | Yes | String |
value | Enter the value which you want to add in the specified attribute. | Yes | String |
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).
XML.StoreEvaluatedXPathResult
This action stores the result of the requested xpath under the specified key. The result can be anything including (but not limited to) inner value of the node and attribute and so forth. You must create request XML based on the required result.
The result stored under the key can be retrieved using key name.
If the requested Xpath is returning multiple sets of values, Qualitia stores these values under key provided by user. Also, if there is no value to store under the key, Qualitia stores blank space.
Input Parameters:
Parameter Name | Parameter Description | Mandatory | Data Type |
---|---|---|---|
XmlFilePath | Enter the absolute path to the XML file from which you want to store the value. | Yes | String |
Xpath | Enter the path to the attribute (Xpath) whose value you want to store. | Yes | String |
Key | Enter the key name under which you want to store the result of the requested xpath. | Yes | String |
Example: (Refer to the image above.)
XML.StoreEvaluatedXPathResult “C:\Users\Qualitia\Actors_List.xml” "//actors/text()" "Key"
Here, this action will store the empty space in the specified key, because there is no inner text present for the node <actors>.
XML.StoreEvaluatedXPathResult “C:\Users\Qualitia\Actors_List.xml” "//actors" "Key"
Here, this action will return all the values from the actors node, including child nodes. In this example above, Qualitia stores John Doe Jane Doe William Kennedy inside the key.
Anchor | ||||
---|---|---|---|---|
|
JSON.StoreValue
This action reads JSON file, navigates to the JSON path, and stores the value of the specified attribute in 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 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. | Yes | String |
strKey | Enter the key name under which you want to store the value. | Yes | String |
Example: Refer to the example above.
JSON.StoreValue “C:\Users\Qualitia\Cust_Details.json” “$.address.postalCode” “PostalCode”
This action will store the value present under the attribute postalCode under the key PostalCode.
JSON.UpdateValue
This action reads 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. | Yes | String |
value | Enter the value which you want to set against the specified attribute. | Yes | String |
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. | Yes | String |
value | Enter the value which you want to set against the specified attribute. | Yes | String |
Example: Refer to the example above.
JSON.StoreJsonPathCount “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).
Multiexcerpt macro | ||
---|---|---|
| ||
REST. |
ExecuteServiceThis 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. You can store the information related to HTTP Status and Header into the variable and use these values to develop test case flow after executing this action. URLs with invalid/expired SSL certificates are not supported. Input Parameters:
|
Example: REST. |
ExecuteService |
“https: |
/ |
/<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" “POST” “C:\Users\Qualitia\Request-Cust_List.json” “C:\Users\Qualitia\Response-Cust_List.json” "Basic" “john.doe@gmail.com” “john.doe@123” "Content-Type=application/x-www-;Authentication=Basic fasdhlsdv" SOAP.ExecuteServiceThis action executes the SOAP request in the specified XML file. You can also store response in the XML file, if required. You can store the information related to HTTP Status and Header into the variable and use these values to develop test case flow after executing this action. URLs with invalid/expired SSL certificates are not supported. Input Parameters:
|
Example: SOAP.ExecuteService |
“https: |
/ |
/<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "ProjectMapping/OAT" “POST” |
“C:\Users\Qualitia\Request-Cust_List.xml” “C:\Users\Qualitia\Response-Cust_List.xml” "Content-Type=application/x-www-;Authentication=Basic fasdhlsdv" REST.ExecuteAPIServiceThis action executes the specified REST request. You can enable or disable the SSL certificate while executing this action. Qualitia gives you provision to store the response at the specified file path location in the JSON format, if required. You can store the information related to HTTP Status and Header into the variable and use these values to develop test case flow after executing this action. Input Parameters:
Example: REST.ExecuteAPIService “https://<HOST_NAME>:<PORT_NUMBER>/<REST_URL>” "POST” “C:\Users\Qualitia\Request-Cust_List.json” “C:\Users\Qualitia\Response-Cust_List.json” "Basic" “john.doe@gmail.com” “john.doe@123” "Content-Type=application/x-www-;Authentication=Basic fasdhlsdv" "True" |