Upload_modify_certficate.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. function uploadSubsidiary()
  2. {
  3. var issuerCode = Project.Variables.code.Value("issuerCode");
  4. var registrarCode = Project.Variables.code.Value("codeRegister");
  5. var securityCode = Project.Variables.code.Value("instrumenLocalCode");
  6. var url = "C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Modify Issuance\\modCertif.csv";
  7. var zip = "C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Modify Issuance\\modCertif.zip";
  8. var certif9 = Project.Variables.certificate.Value("certif9");
  9. var template =
  10. 'registrarCode|instrumentCode|certificateNumber|brokerOrCustodianCode|InstrumentSeries\n'+
  11. ''+registrarCode+'|'+securityCode+'|'+certif9+'|9Z000|B'
  12. ;
  13. if (aqFile.Create(url) == 0)
  14. {
  15. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  16. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  17. }
  18. else
  19. {
  20. aqFile.Delete(url);
  21. aqFile.Delete(zip);
  22. if (aqFile.Create(url) == 0)
  23. {
  24. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  25. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  26. }
  27. }
  28. }