Upload_Account.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. function uploadIndividual()
  2. {
  3. var issuerCode = Project.Variables.code.Value("issuerCode");
  4. var registrarCode = Project.Variables.code.Value("codeRegister");
  5. var clientCode = Project.Variables.code.Value("accountclientCodeUpload");
  6. var name = Project.Variables.name.Value("investoreIndividualName1");
  7. var sid = Aliases.browser.pageEBaePtKustodianSentralEfekIn.cell70.innerText;
  8. var template =
  9. '<Message>\n'+
  10. '<Record name="data">\n'+
  11. '<Field name="accountSID">'+sid+'</Field>\n'+
  12. '<Field name="accountParticipantCode">'+registrarCode+'</Field>\n'+
  13. '<Field name="accountIssuerCode">'+issuerCode+'</Field>\n'+
  14. '<Field name="accountClientCode">'+clientCode+'</Field>\n'+
  15. '<Field name="accountOptionType">SEC</Field>\n'+
  16. '<Field name="accountComminglingCashAccount">y</Field>\n'+
  17. '<Field name="accountType">120</Field>\n'+
  18. '<Field name="accountCorrespondentBank"></Field>\n'+
  19. '<Field name="accountCorrespondentAccountNumber"></Field>\n'+
  20. '<Field name="accountOwner">2</Field>\n'+
  21. '<Field name="accountNomineeSID">1234567890</Field>\n'+
  22. '<Field name="accountDescription">'+name+'</Field>\n'+
  23. '<Field name="accountAction">CREATE</Field>\n'+
  24. '<Field name="accountStakeholderType">I</Field>\n'+
  25. '<Field name="accountComments"></Field>\n'+
  26. '<Field name="accountExcludeDormant">n</Field>\n'+
  27. '<Field name="accountBillingFlag">n</Field>\n'+
  28. '<Field name="accountCAFlag">n</Field>\n'+
  29. '</Record>\n'+
  30. '</Message>\n';
  31. if (aqFile.Create("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Account\\account.sdiac") == 0)
  32. {
  33. aqFile.WriteToTextFile("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Account\\account.sdiac", template, aqFile.ctUTF8);
  34. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  35. }
  36. else
  37. {
  38. aqFile.Delete("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Account\\account.sdiac");
  39. aqFile.Delete("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Account\\account.zip");
  40. if (aqFile.Create("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Account\\account.sdiac") == 0)
  41. {
  42. aqFile.WriteToTextFile("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Account\\account.sdiac", template, aqFile.ctUTF8);
  43. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  44. }
  45. }
  46. }