I tried editing YAML file and I came across only few keywords that can be used for editing dictionary values of YAML file. But I need to edit list values in YAML file as well. So, where can I get all the keywords list which can be used for editing YAML file using robot framework?
Example: 1. Below is the sample YAML file
"patch_id_bw_data":
"pronghornResponseBody":
"shimBehaviourHeader":
"destinationURL": ""
"method": "PATCH"
"targetName": "naas"
"customHeaders": {}
"responseBody":
- "op": "replace"
"path": "/serviceCharacteristic"
"value":
- "name": "bandwidth"
"value": ""
- Here is the code for editing dictionary values. Same I want to do for list as well.
*** Settings ***
Library yaml
Library OperatingSystem
Library Collections
*** Test Cases ***
Load YAML into Robot and edit it
${YAML}= Get File ${CURDIR}${/}data.yaml
${LOADED}= yaml.Safe Load ${YAML}
Set To Dictionary ${LOADED}[patch_id_bw_data][pronghornResponseBody][responseBody][0][value][0] value=200
${OUTPUT}= yaml.Dump ${LOADED}
Create File newdata.yaml ${OUTPUT}