Here is the ui app screenshot- its a yaml page
The UI is a code editor, used to enter or update yaml/json content. I am trying to update 'value1' using the karate UI syntax's and it didnt seem to work, below are the trials
* string element = "//span[text()='Parent']/following::span[text='Child1']/following::span[text='value1']
#Syntax Approaches:
* script(element, "_.innerHTML='100'")
* script(element, "_.innerHTML='value1'").input('100')
And waitFor(element).input('100')
* input(element, '100')
When value(element, '100')
* locate(element).input('100')
- script(element, "_.innerHTML='100'") - worked, but the value '100' however was not persisted till saving it.
sample app - https://onlineyamltools.com/edit-yaml
sample yaml -
**
parent:
child:
key1: value1
key2: value2
child2:
key3: value3
key4: value4
**
element locator: //span[text()='parent']/following::span[contains(text(),'child')]/following::span[contains(text(),'value1')]
All I need is to be able to update the 'value1' to '100' and save it. Thanks