function transfer121() { var registrarCode = Project.Variables.code.Value("codeRegister"); var url = "C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Transfer 121\\transfer_121_up.str"; var zip = "C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Transfer 121\\transfer_121_up.zip"; var account1 = Project.Variables.getSid.Value("sid1"); var account2 = Project.Variables.getAccount1.Value("sid1"); var securityCode = Project.Variables.code.Value("instrumenLocalCode"); var certif12 = Project.Variables.certificate.Value("certif13"); var today = new Date(); var dd = String(today.getDate()).padStart(2, '0'); var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0! var yyyy = today.getFullYear(); today = yyyy + mm + dd; var template = '\n'+ '\n'+ ''+certif12+'\n'+ ''+registrarCode+'\n'+ ''+account1+'\n'+ ''+account2+'\n'+ 'ISIN\n'+ ''+securityCode+'\n'+ '11\n'+ ''+today+'\n'+ 'Testing\n'+ '\n'+ ''+certif12+'\n'+ '\n'+ 'TRAD\n'+ '\n'+ '' ; if (aqFile.Create(url) == 0) { aqFile.WriteToTextFile(url, template, aqFile.ctUTF8); Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis."); } else { aqFile.Delete(url); aqFile.Delete(zip); if (aqFile.Create(url) == 0) { aqFile.WriteToTextFile(url, template, aqFile.ctUTF8); Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis."); } } }