Upload_Modify_Unclaimed_Deactive.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. function modifyUnclaimedAsset()
  2. {
  3. var issuerCode = Project.Variables.code.Value("issuerCode");
  4. var registrarCode = Project.Variables.code.Value("codeRegister");
  5. var clientCode1 = Project.Variables.code.Value("accountClientCode3");
  6. var clientCOde2 = Project.Variables.code.Value("accountClientCode4");
  7. var instituionalCode = Project.Variables.code.Value("instituionalCode");
  8. var url = "C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Unclaimed Asset Deact\\account_sdiuc_deact.sdiuc";
  9. var zip = "C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Unclaimed Asset Deact\\account_sdiuc.deact.zip";
  10. var template =
  11. '<Message>\n'+
  12. '<Record name="data">\n'+
  13. '<Field name="registrarRef">Automation Testing 02</Field>\n'+
  14. '<Field name="accountParticipantCode">'+registrarCode+'</Field>\n'+
  15. '<Field name="accountIssuerCode">'+issuerCode+'</Field>\n'+
  16. '<Field name="accountClientCode">'+clientCOde2+'</Field>\n'+
  17. '<Field name="accountOptionType">SEC</Field>\n'+
  18. '<Field name="accountType">121</Field>\n'+
  19. '<Field name="accountOwner">1</Field>\n'+
  20. '<Field name="accountDescription">Automation 02 modify</Field>\n'+
  21. '<Field name="accountAction">CLOSE</Field>\n'+
  22. '<Field name="accountStakeholderType">I</Field>\n'+
  23. '</Record>\n'+
  24. '</Message>'
  25. if (aqFile.Create(url) == 0)
  26. {
  27. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  28. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  29. }
  30. else
  31. {
  32. aqFile.Delete(url);
  33. aqFile.Delete(zip);
  34. if (aqFile.Create(url) == 0)
  35. {
  36. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  37. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  38. }
  39. }
  40. }