function xdata(param) { var randyi = ""; for (ii = 0; ii<= 3; ii++ ) { randy = Math.floor(Math.random() * (9 - 0)); randyi = randyi + randy.toString(); } var ktp = ""; for (i = 0; i<= 7; i++ ) { Rand = Math.floor(Math.random() * (9 - 0)); ktp = ktp + Rand.toString(); } this.getdata = function datacollection() { data = [ktp, randyi] } } const dataset = new xdata(); function PATCH_013_GET_FUND_NAME() { dataset.getdata(); let fund = Aliases.browser.page1011261948080.textnode.shadowroot.textnode7.shadowroot.textbox.Text; let url = "C:\\Users\\vendor_qafusi4\\Documents\\S-INVEST GUI\\S-Invest GUI\\Data Source\\Data Input\\02. Fund Data Management\\patch_012_fund_registration.txt"; var shortname = 'TF'+data[1]; var descripsi = 'Testing Fund '+aqConvert.DateTimeToFormatStr(aqDateTime.Today(), "%Y%m%d"); var today = new Date(); var closing = new Date(); var dd = String(today.getDate()).padStart(2, '0');//date today var dd2 = String(today.getDate() + 2).padStart(2, '0');// 2 Hari kemudian var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0! var yyyy = today.getFullYear(); today = yyyy+'-'+mm+'-'+dd; closing = yyyy+'-'+mm+'-'+dd2; let template = 'fundName'+','+'description'+','+'effectiveDate'+','+'closingDate'+','+'ShortNameFund\n' ''+fund+','+descripsi+','+today+','+closing+','+shortname+'' ; if (aqFile.Create(url) == 0) { aqFile.WriteToTextFile(url, template, aqFile.ctUTF8); Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis."); } else { aqFile.Delete(url); if (aqFile.Create(url) == 0) { aqFile.WriteToTextFile(url, template, aqFile.ctUTF8); Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis."); } } }