XML and JSON Operations
Last updated
Last updated
Description: This keyword or action instructs Avo Assure Client to fetch the number of blocks in the given input and save the result in the output variable.
Find the snippet of the keyword below for JSON:
In the above example, after the test case debug, it fetches the number of blocks in the given input. It saves the result in the output variable {result}, and the execution status “True”/ “False” will be stored in the second output variable if provided.
Note: For JSON inputs, the block count of the block with a certain key-value pair can be fetched. Syntax: <JSON_block>; <parent_blockname>.<child_block/key_name>:<child_block/key_value>; <parent_blockindex>.<child_blockindex>
Find the snippet of the keyword below for JSON when fetching block count based on key-value pair match:
In the above example, after the test case debug, it fetches the number of blocks in the given input that match the criteria of the key ‘pin’ to have the value ‘560012’. It saves the result in the output variable {result}, and the execution status “True” / “False” will be stored in the second output variable, if provided.
Find the snippet of the keyword below for XML:
In the above example, after the test case debug, it fetches the number of blocks in the given input and saves the result in the output variable {A}. The execution status “True”/ “False” will be stored in the output variable.
Description: This keyword or action instructs Avo Assure Client to fetch the value of the XML block/tag specified by the user and save the result in the output variable.
Find the snippet of the keyword below for XML:
In the above example, after the test case debug, it fetches the value of the XML block. It saves the result in the output variable {B}, and the execution status “True”/ “False” will be stored in the variable {GetBlockValue}.
Description: This keyword or action instructs Avo Assure Client to fetch the tag value from the input provided by the user and save the result in the output variable.
Find the snippet of the keyword below for XML:
In the above example, after the test case debug, it fetches the value from the input provided. It saves the result in the output variable {C}, and the execution status “True”/ “False” will be stored in the variable {TagValue}.
Description: This keyword or action instructs Avo Assure Client to fetch the value of the specified key from the input provided by the user and save the result in the output variable.
Find the snippet of the keyword below for JSON:
In the above example, after the test case debug, it fetches the key’s value from the input provided and saves the result in the output variable {getKeyValue}. In this example, {getKeyValue} will hold “Blueberry”.
Description: This keyword or action instructs Avo Assure Client to set the value of the specified key from the input provided by the user and save the result in the output variable.
Find the snippet of the keyword below for JSON:
In the above example, after the test case debug, it sets the key’s value from the input provided and saves the result in the output variable {setKeyValue}. In this example, “Devils Food” will be replaced by “Heavens Food” and {setKeyValue} will hold the changed JSON.
Description: This keyword or action instructs Avo Assure Client to verify if 2 JSON files or 2 JSON data match or do not match.
Find the snippet of the keyword below:
In the above example, after the test case debug, the JSON files are compared, and the match result (True/ False) will be stored in the output variable {result}.
Description: This keyword or action instructs Avo Assure Client to fetch the block data based on the given block xpath.
Find the snippet of the keyword below:
In the above example, after the test case debug, it fetches the block data based on the block xpath given in the input and saves the result in the output variable {BlockData}.
Description: This keyword or action instructs Avo Assure Client to compare the block data with the XML file specified whose block xpath is provided.
Find the snippet of the keyword below:
In the above example, after the test case debug, it compares the block data provided by the getXmlBlockData keywords with the file based on its block xpath and stores the comparison result in the output variable {result}.
Description: This keyword or action instructs Avo Assure Client to use the specified block data (based on block xpath) and compare the block data between 2 XML files.
Find the snippet of the keyword below:
In the above example, after the test case debug, it compares the block data provided between the XML files and stores the comparison result in the output variable {result}.