How to update XML file remotely at particular node?

Asked by Rajesh on 2018-12-14

Hi Team,

I'm using Sikuli for testing desktop applications,i want to update Value with System date in below xml file,can anyone please provide code,how to update date in particular place,i want to update 11-12-2018 to Current System date.

XML File:

<add key="TimeOut" value="7200"/>
<add key="Is" value="1"/>
<add key="Cul" value="en-US"/>
<add key="Date" value="11-12-2018"/>
<add key="CreatedUser" value="TESTING"/>

i've tried below steps but no use, Please help me how to do this one.

Take screenshot for 11-12-2018
Store into png format
screen.type(png,"12-12-2018")

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2018-12-14
Last reply:
2019-01-02
RaiMan (raimund-hocke) said : #1

use paste() (see faq 933 and the docs)

... not possible, to access the file directly with file I/O?

Rajesh (rajeshkuchana) said : #2

Hi RaiMan,

Please provide code, i've tried paste() and paste(image,text) methods but no luck.

RaiMan (raimund-hocke) said : #3

... Please provide code
you should do that, to see what might be failing

TestMechanic (ndinev) said : #4

Are you trying to update text is some editor? It can be done but you need to provide more info about the text editor (screenshot or clip)

If UI editing is not required You can use conventional file operations.

Can you help with this problem?

Provide an answer of your own, or ask Rajesh for more information if necessary.

To post a message you must log in.