function transfer121() { var registrarCode = Project.Variables.code.Value("codeRegister"); var url = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Transfer 121\\transfer.str"; var zip = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Transfer 121\\transfer.zip"; var account1 = Aliases.browser.pageEBaePtKustodianSentralEfekIn.cell79.innerText; var account2 = Aliases.browser.pageEBaePtKustodianSentralEfekIn.cell70.innerText; var securityCode = Project.Variables.code.Value("instrumenLocalCode"); 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'+ 'ECN013\n'+ ''+registrarCode+'\n'+ ''+account1+'\n'+ ''+account2+'\n'+ 'ISIN\n'+ ''+securityCode+'\n'+ '11\n'+ ''+today+'\n'+ 'Testing\n'+ '\n'+ 'ECN013\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."); } } }