12345678910111213141516171819202122232425262728293031323334 |
- function PATCH_006_GET_PARTICIPANT_NAME() {
- let participant = Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtname.shadowroot.textbox.Text;
- let url = "C:\\Users\\vendor_qafusi4\\Documents\\S-INVEST GUI\\S-Invest GUI\\Data Source\\Data Input\\01. Participant Management\\Participant & Lifting of Suspension.txt";
-
- 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 =
- 'participantName'+','+'effectiveDate'+','+'closingDate\n'+
- ''+participant+','+today+','+closing+''
- ;
-
- 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.");
- }
- }
- }
|