2 Library Selenium2Library
3 Library OperatingSystem
6 ##Library HttpLibrary.HTTP
13 [Documentation] Getting server time to update the json request
14 [Arguments] ${RequestFile}
16 ${date}= Get Current Date time_zone=local result_format=%Y-%m-%dT%H:%M:%S.%fZ exclude_millis=False
18 #updating the request file with the server time
19 ${file_content}= OperatingSystem.Get File ${RequestFile}
20 @{list}= Split to lines ${file_content}
21 ${data}= Get from list ${list} 5
22 @{splitted_string}= Split String ${data} : 1
23 ${time}= Get From List ${splitted_string} 1
25 @{splitted_string_time}= Split String ${time} " 2
26 ${times1}= Get From List ${splitted_string_time} 1
28 ${replaced_string}= Replace String ${data} ${times1} ${date}
29 @{list1}= Split to lines ${file_content}
30 Remove from list ${list1} 5
31 Insert into list ${list1} 5 ${replaced_string}
32 Remove File ${RequestFile}
33 :FOR ${line} IN @{list1}
34 \ Append to File ${RequestFile} ${line} encoding=UTF-8
35 \ Append to File ${RequestFile} ${\n} encoding=UTF-8