123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364 |
- 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<= 12; i++ ) {
- Rand = Math.floor(Math.random() * (9 - 0));
- ktp = ktp + Rand.toString();
- }
- this.getdata = function datacollection() {
- data = [ktp, randyi]
- }
- }
- const dataset = new xdata();
-
- function xdata2(param1) {
- var randy2 = "";
- for (ii = 0; ii<= 3; ii++ ) {
- randy3 = Math.floor(Math.random() * (9 - 0));
- randy2 = randy2 + randy3.toString();
- }
- var npwp = "";
- for (i = 0; i<= 15; i++ ) {
- Rand3 = Math.floor(Math.random() * (9 - 0));
- npwp = npwp + Rand3.toString();
- }
- this.getdata = function datacollection() {
- data2 = [npwp, randy2]
- }
- }
- const dataset1 = new xdata2();
-
- function xdata3(param2) {
- var randy3 = "";
- for (ii = 0; ii<= 3; ii++ ) {
- randy4 = Math.floor(Math.random() * (9 - 0));
- randy3 = randy3 + randy4.toString();
- }
- var sub = "";
- for (i = 0; i<= 9; i++ ) {
- Rand4 = Math.floor(Math.random() * (9 - 0));
- sub = sub + Rand4.toString();
- }
- this.getdata = function datacollection() {
- data3 = [sub, randy4]
- }
- }
- const dataset2 = new xdata3();
- function checkCode() {
- for (i = 0; i <= 10; i++){
- if (Aliases.PTW.dlg.btnOK.Exists) {
- Aliases.PTW.dlg.btnOK.ClickButton();
- let wizardControl2_1 = Aliases.PTW.Wizard2.WizardControl2;
- let panel = wizardControl2_1.panel2;
- panel.panelLeft.panelStepLabels.CondicoLabel3.Click(29, 11);
- Delay(2000)
- condicoPlainTextBox.SetText(generateCode());
- Delay(2000)
- wizardControl2_1.kryptonGroupButtons.tableLayoutPanel2.flowLayoutPanel2.tableLayoutPanel1.btnFinish.ClickButton();
- Delay(15000)
- }else {
- break;
- }
- }
- }
- function generateCode(randyi) {
- var randyi = "";
- for (ii = 0; ii<= 3; ii++ ) {
- randy = Math.floor(Math.random() * (9 - 0));
- randyi = randyi + randy.toString();
- }
- randyi = "T"+randyi;
- return randyi;
- }
- function PATCH_029_CREATE_FUND_PART_I(){
- Rand1 = Math.floor(Math.random() * (9 - 0));
- dataset.getdata();
- dataset1.getdata();
- dataset2.getdata();
- //Clicks the 'button' button.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode6.shadowroot.textnodeAddNew.shadowroot.button.ClickButton();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Simulates a user action over the area that contains the recognized text.
- OCR.Recognize(Aliases.browser.page1011261948080.textnode5.shadowroot.labelImCode).BlockByText("IM Code").Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeTxtSearch.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text 'LG002' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeTxtSearch.shadowroot.textbox.SetText("LG002");
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'button' button.
- Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeBtnSearch.shadowroot.button.ClickButton();
- //Delays the test execution for the specified time period.
- Delay(7000);
- //Double-clicks the 'cellVaadinGridCell9' object.
- Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeGrdResults.shadowroot.cellVaadinGridCell9.DblClick(69, 30);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode7.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text 'FUND TESTING ' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode7.shadowroot.textbox.SetText("FUND TESTING "+data[1]);
- //Delays the test execution for the specified time period.
- Delay(1500);
- }
- function PATCH_029_CREATE_FUND_PART_II(){
- Rand1 = Math.floor(Math.random() * (9 - 0));
- dataset.getdata();
- dataset1.getdata();
- dataset2.getdata();
- //Simulates one or several keypresses.
- //Aliases.browser.page1011261948080.textnode.shadowroot.textnode7.shadowroot.textbox.Keys(aqConvert.DateTimeToFormatStr(aqDateTime.Today(), "%Y%m%d"));
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode8.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text '1234567890' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode8.shadowroot.textbox.SetText(data2[0]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode9.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text 'FUNDTE' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode9.shadowroot.textbox.SetText("FD"+data[1]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode10.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Simulates one or several keypresses.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode10.shadowroot.textbox.Keys(data3[0]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode11.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Simulates one or several keypresses.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode11.shadowroot.textbox.Keys(data[0]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode12.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Simulates one or several keypresses.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode12.shadowroot.textbox.Keys("Fund Testing "+data[1]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode13.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Simulates one or several keypresses.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode13.shadowroot.textbox.Keys(data[0]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode14.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Simulates one or several keypresses.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode14.shadowroot.textbox.Keys(data2[0]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode15.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Simulates one or several keypresses.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode15.shadowroot.textbox.Keys(data3[0]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode16.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Simulates one or several keypresses.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode16.shadowroot.textbox.Keys(data3[0]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode17.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text '12345678' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode17.shadowroot.textbox.SetText(data[0]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode18.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text 'TESTING FUND 12345' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode18.shadowroot.textbox.SetText("TESTING FUND "+data[1]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode19.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text '2' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode19.shadowroot.textbox.SetText(Rand1);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode20.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text '2' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode20.shadowroot.textbox.SetText(Rand1);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode21.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text '2' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode21.shadowroot.textbox.SetText(Rand1);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode22.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text '2' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode22.shadowroot.textbox.SetText(Rand1);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode23.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text '2' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode23.shadowroot.textbox.SetText(Rand1);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode24.shadowroot.textbox.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text '2' in the 'textbox' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnode24.shadowroot.textbox.SetText(Rand1);
- //Delays the test execution for the specified time period.
- Delay(3000);
- }
- function PATCH_029_CREATE_FUND_PART_III(){
- Rand1 = Math.floor(Math.random() * (9 - 0));
- dataset.getdata();
- dataset1.getdata();
- dataset2.getdata();
-
- //Clicks the 'cellVaadinGridCell4' control.
- //Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnodeGrid.shadowroot.cellVaadinGridCell4.Click();
- //Delays the test execution for the specified time period.
- //Delay(5000);
- //Sets the text 'JLN. TESTING' in the 'textbox2' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode.shadowroot.textbox2.SetText("JLN. FUND TESTING "+data[1]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox2' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode2.shadowroot.textbox2.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text '12345678' in the 'textbox2' text editor.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode2.shadowroot.textbox2.SetText("1"+data[1]);
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'panelVaadinSelectTextFieldInput' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode3.shadowroot.textnode.shadowroot.panelVaadinSelectTextFieldInput.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textnodeDkiJakarta' control.
- Aliases.browser.page1011261948080.textnodeDkiJakarta.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'table' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnodeGrid.shadowroot.table.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'panelToggle' control.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode4.shadowroot.panelToggle.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textnodeJakartaSelatan' control.
- Aliases.browser.page1011261948080.textnodeJakartaSelatan.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'button' button.
- Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode5.shadowroot.textnodeAddNew.shadowroot.button.ClickButton();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'textbox2' control.
- Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeTxtSearch.shadowroot.textbox2.Click();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Sets the text 'Indonesia' in the 'textbox2' text editor.
- Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeTxtSearch.shadowroot.textbox2.SetText("Indonesia");
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Clicks the 'button' button.
- Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeBtnSearch.shadowroot.button.ClickButton();
- //Delays the test execution for the specified time period.
- Delay(3000);
- //Double-clicks the 'textnode1' object.
- Aliases.browser.page1011261948080.textnode5.shadowroot.textnode1.DblClick(114, 12);
- //Delays the test execution for the specified time period.
- Delay(3000);
- }
- function PATCH_029_GET_FUND_NAME() {
- 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_029_deactive_fund.txt";
-
- 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\n'+
- ''+fund+','+descripsi+','+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.");
- }
- }
- }
|