123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- function uploadIndividual()
- {
- var registrarCode = Project.Variables.code.Value("codeRegister");
- var issuerCode = Project.Variables.code.Value("issuerCode");
- var clientCode = Project.Variables.code.Value("accountclientCodeUpload");
- var nameIndividual = Project.Variables.name.Value("investoreIndividualName1");
- var ktpIndividual = Project.Variables.npwp.Value("ktpInvestor1");
- var passportNumber = Project.Variables.code.Value("passportNumberUpload");
- var bod = Project.Variables.createUser.Value("bodUpload");
- var url = "C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Investor Individual\\";
-
- var template =
- '<Message>\n'+
- '<Record name="data">\n'+
- '<Field name="action">CREATION</Field>\n'+
- '<Field name="investorType">INDIVIDUAL</Field>\n'+
- '<Field name="investorClientType">DIRECT</Field>\n'+
- '<Field name="accountLocalCode">'+registrarCode+'</Field>\n'+
- '<Field name="accountClientCode">'+clientCode+'</Field>\n'+
- '<Field name="accountIssuerCode">'+issuerCode+'</Field>\n'+
- '<Field name="accountTaxCode">101001</Field>\n'+
- '<Field name="investorFirstName"><![CDATA['+nameIndividual+']]></Field>\n'+
- '<Field name="investorMiddleName"></Field>\n'+
- '<Field name="investorLastName"></Field>\n'+
- '<Field name="investorNationality">CN</Field>\n'+
- '<Field name="investorKTPNumber">'+ktpIndividual+'</Field>\n'+
- '<Field name="investorKTPRegistrationDate"></Field>\n'+
- '<Field name="investorKTPExpiredDate">20251010</Field>\n'+
- '<Field name="investorNPWPNumber"></Field>\n'+
- '<Field name="investorNPWPRegistrationDate"></Field>\n'+
- '<Field name="investorPassportNumber">'+passportNumber+'</Field>\n'+
- '<Field name="investorPassportExpiredDate">21200312</Field>\n'+
- '<Field name="investorKitasSKDNumber"></Field>\n'+
- '<Field name="investorKitasSKDExpiredDate"></Field>\n'+
- '<Field name="investorBirthPlace">JAKARTA</Field>\n'+
- '<Field name="investorBirthDate">'+bod+'</Field>\n'+
- '<Field name="investorAddress1">JALAN AUTOMATION</Field>\n'+
- '<Field name="investorAddress2"></Field>\n'+
- '<Field name="investorAddress3"></Field>\n'+
- '<Field name="investorCity">999</Field>\n'+
- '<Field name="investorProvince">1000</Field>\n'+
- '<Field name="investorPostalCode"></Field>\n'+
- '<Field name="investorCountry">CN</Field>\n'+
- '<Field name="investorHomePhone"></Field>\n'+
- '<Field name="investorMobilePhone"></Field>\n'+
- '<Field name="investorEmail"></Field>\n'+
- '<Field name="investorFax"></Field>\n'+
- '<Field name="investorOtherAddress1"></Field>\n'+
- '<Field name="investorOtherAddress2"></Field>\n'+
- '<Field name="investorOtherAddress3"></Field>\n'+
- '<Field name="investorOtherCity"></Field>\n'+
- '<Field name="investorOtherProvince"></Field>\n'+
- '<Field name="investorOtherPostalCode"></Field>\n'+
- '<Field name="investorOtherCountry"></Field>\n'+
- '<Field name="investorOtherHomePhone"></Field>\n'+
- '<Field name="investorOtherMobilePhone"></Field>\n'+
- '<Field name="investorOtherEmail"></Field>\n'+
- '<Field name="investorOtherFax"></Field>\n'+
- '<Field name="investorSex">1</Field>\n'+
- '<Field name="investorMaritalStatus">1</Field>\n'+
- '<Field name="investorSpouseName"></Field>\n'+
- '<Field name="investorMothersMaidenName">AUTOMATION</Field>\n'+
- '<Field name="investorHeirName"></Field>\n'+
- '<Field name="investorHeirRelation"></Field>\n'+
- '<Field name="investorEducationalBackground">3</Field>\n'+
- '<Field name="investorOccupation">4</Field>\n'+
- '<Field name="investorOccupationText"></Field>\n'+
- '<Field name="investorNatureofBusiness"></Field>\n'+
- '<Field name="investorIncomePerAnnum">2</Field>\n'+
- '<Field name="investorFundSource">2</Field>\n'+
- '<Field name="investorFundSourceText"></Field>\n'+
- '<Field name="accountDescription"></Field>\n'+
- '<Field name="investorBankAccountName1"></Field>\n'+
- '<Field name="investorBankAccountNumber1"></Field>\n'+
- '<Field name="investorBankAccountBICCode1"></Field>\n'+
- '<Field name="investorBankAccountHolderName1"></Field>\n'+
- '<Field name="investorBankAccountCurrency1"></Field>\n'+
- '<Field name="investorBankAccountName2"></Field>\n'+
- '<Field name="investorBankAccountNumber2"></Field>\n'+
- '<Field name="investorBankAccountBICCode2"></Field>\n'+
- '<Field name="investorBankAccountHolderName2"></Field>\n'+
- '<Field name="investorBankAccountCurrency2"></Field>\n'+
- '<Field name="investorBankAccountName3"></Field>\n'+
- '<Field name="investorBankAccountNumber3"></Field>\n'+
- '<Field name="investorBankAccountBICCode3"></Field>\n'+
- '<Field name="investorBankAccountHolderName3"></Field>\n'+
- '<Field name="investorBankAccountCurrency3"></Field>\n'+
- '<Field name="investorInvestmentObjective">1</Field>\n'+
- '<Field name="DirectSid"></Field>\n'+
- '<Field name="AssetOwner">1</Field>\n'+
- '<Field name="accountCreationFlag">N</Field>\n'+
- '</Record>\n'+
- '</Message>' ;
-
-
- if (aqFile.Create(url + 'inv_inda.sdi') == 0)
- {
-
- aqFile.WriteToTextFile(url + 'inv_inda.sdi', template, aqFile.ctUTF8);
- Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
-
- var fileName = "inv_inda.sdi";
- Log.SaveResultsAs(fileName, 2);
- // Specifies the name of the archive
- var archivePath = url + "inv_indi";
- // Packes the resutls
- if (slPacker.Pack(fileName, url, archivePath)) {
-
- var OldPath = url + "inv_indi.Zip";
- var NewPath = url + "inv_inda.zip";
-
- // Renames the file
- aqFileSystem.RenameFile(OldPath, NewPath);
-
- Log.Message("Files compressed successfully.");
- }
- }
- else
- {
- aqFile.Delete(url + 'inv_inda.sdi');
- Log.Message("Delete successfully.");
- aqFile.Delete(url + 'inv_inda.zip');
- Log.Message("Delete successfully.");
-
- if (aqFile.Create(url + 'inv_inda.sdi') == 0)
- {
-
- aqFile.WriteToTextFile(url + 'inv_inda.sdi', template, aqFile.ctUTF8);
- Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
-
- var fileName = "inv_inda.sdi";
- Log.SaveResultsAs(fileName, 2);
- // Specifies the name of the archive
- var archivePath = url + "inv_indi";
- // Packes the resutls
- if (slPacker.Pack(fileName, url, archivePath)) {
- var OldPath = url + "inv_indi.Zip";
- var NewPath = url + "inv_inda.zip";
-
- // Renames the file
- aqFileSystem.RenameFile(OldPath, NewPath);
-
- Log.Message("Files compressed successfully.");
- }
- }
- }
- }
-
|