From c9cc12f49c30d4816ee5ea112df39a217a327f62 Mon Sep 17 00:00:00 2001 From: jwc Date: Wed, 12 Aug 2020 09:42:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=99=E5=85=A5=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=85=B3=E9=94=AE=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 02-Keyword/tsg_adc/FileOperation.robot | 35 +++++++++++++------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/02-Keyword/tsg_adc/FileOperation.robot b/02-Keyword/tsg_adc/FileOperation.robot index c9a8d91..b55d054 100644 --- a/02-Keyword/tsg_adc/FileOperation.robot +++ b/02-Keyword/tsg_adc/FileOperation.robot @@ -1,33 +1,32 @@ *** Settings *** -Library String -Library json -Library OperatingSystem -Library RequestsLibrary -Library Selenium2Library -Library Collections -Library FileLibrary -Resource ../../02-Keyword/tsg_bfapi/Common.robot -Resource ../../03-Variable/BifangApiVariable.txt - +Library String +Library json +Library OperatingSystem +Library RequestsLibrary +Library Selenium2Library +Library Collections +Library FileLibrary +Resource ../../02-Keyword/tsg_bfapi/Common.robot +Resource ../../03-Variable/BifangApiVariable.txt *** Keywords *** insert_policyId_to_file - [Arguments] ${key} ${policyId} ${objectids} + [Arguments] ${key} ${policyId} ${objectids} ${dict} Create Dictionary policyId=${policyId} objectId=${objectids} - ${json} json.Dumps ${dict} + ${json} json.Dumps ${dict} Alter Dict ${path}/03-Variable/AllFlowCaseVariable.txt ${key} ${json} - + insert_time_to_file - [Arguments] ${key} ${starttime} ${endtime} + [Arguments] ${key} ${starttime} ${endtime} ${value} json.Loads ${${key}} - ${dict} Create Dictionary policyId=${value}[policyId] objectId=${value}[objectId] starttime=${starttime} endtime=${endtime} - ${json} json.Dumps ${dict} + ${dict} Create Dictionary policyId=${value}[policyId] objectId=${value}[objectId] starttime=${starttime} endtime=${endtime} + ${json} json.Dumps ${dict} Alter Dict ${path}/03-Variable/AllFlowCaseVariable.txt ${key} ${json} + insert_policyId_to_file1 [Arguments] ${key} ${objectids} Alter Dict ${path}/AllFlowCaseVariable.txt ${key} ${objectids} insert_time_to_file1 - [Arguments] ${key} ${starttime} ${key2} ${endtime} + [Arguments] ${key} ${starttime} Alter Dict ${path}/AllFlowCaseVariable1.txt ${key} ${starttime} - Alter Dict ${path}/AllFlowCaseVariable1.txt ${key2} ${endtime}