Upload_Subsidiary.js.bak 2.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. function uploadSubsidiary()
  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 establishDate = Project.Variables.createUser.Value("establishedUpload");
  7. var npwp = Project.Variables.npwp.Value("npwpInstituional1");
  8. var template =
  9. 'IssuerCode|SubsidiaryName|DateOfEstablishment|PlaceOfEstablishment|LegalDomicile|NPWP|BusinessRegistrationNumber|Address|Country|Province|City|Status|AssetYear|Asset Period|AssetCurrency|TotalAsset|ListedOnIDX|IDXCode|OwnershipPercentage|LembagaJasaKeuangan|LJKType \n'+
  10. ''+issuerCode+'|'+'PT Automation Indonesia|'+''+establishDate+'|'+'Medan|'+'ID|'+''+npwp+'||'+'Jalan Automation|'+'ID|5|141|1|2020|Q4|IDR|3000000000|N||50.2|N|'
  11. ;
  12. if (aqFile.Create("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Subsidiary\\subsidiary.csv") == 0)
  13. {
  14. aqFile.WriteToTextFile("C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Subsidiary\\subsidiary.csv", template, aqFile.ctUTF8);
  15. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  16. }
  17. else
  18. {
  19. aqFile.Delete("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Subsidiary\\subsidiary.csv");
  20. aqFile.Delete("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Subsidiary\\subsidiary.zip");
  21. if (aqFile.Create("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Subsidiary\\subsidiary.csv") == 0)
  22. {
  23. aqFile.WriteToTextFile("C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Subsidiary\\subsidiary.csv", template, aqFile.ctUTF8);
  24. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  25. }
  26. }
  27. }