PATCH_003.js 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. function xdata(param) {
  2. var randyi = "";
  3. for (ii = 0; ii<= 3; ii++ ) {
  4. randy = Math.floor(Math.random() * (9 - 0));
  5. randyi = randyi + randy.toString();
  6. }
  7. var ktp = "";
  8. for (i = 0; i<= 12; i++ ) {
  9. Rand = Math.floor(Math.random() * (9 - 0));
  10. ktp = ktp + Rand.toString();
  11. }
  12. this.getdata = function datacollection() {
  13. data = [ktp, randyi]
  14. }
  15. }
  16. const dataset = new xdata();
  17. function xdata2(param1) {
  18. var randy2 = "";
  19. for (ii = 0; ii<= 3; ii++ ) {
  20. randy3 = Math.floor(Math.random() * (9 - 0));
  21. randy2 = randy2 + randy3.toString();
  22. }
  23. var npwp = "";
  24. for (i = 0; i<= 15; i++ ) {
  25. Rand3 = Math.floor(Math.random() * (9 - 0));
  26. npwp = npwp + Rand3.toString();
  27. }
  28. this.getdata = function datacollection() {
  29. data2 = [npwp, randy2]
  30. }
  31. }
  32. const dataset1 = new xdata2();
  33. function checkCode() {
  34. for (i = 0; i <= 10; i++){
  35. if (Aliases.PTW.dlg.btnOK.Exists) {
  36. Aliases.PTW.dlg.btnOK.ClickButton();
  37. let wizardControl2_1 = Aliases.PTW.Wizard2.WizardControl2;
  38. let panel = wizardControl2_1.panel2;
  39. panel.panelLeft.panelStepLabels.CondicoLabel3.Click(29, 11);
  40. Delay(2000)
  41. condicoPlainTextBox.SetText(generateCode());
  42. Delay(2000)
  43. wizardControl2_1.kryptonGroupButtons.tableLayoutPanel2.flowLayoutPanel2.tableLayoutPanel1.btnFinish.ClickButton();
  44. Delay(15000)
  45. }else {
  46. break;
  47. }
  48. }
  49. }
  50. function generateCode(randyi) {
  51. var randyi = "";
  52. for (ii = 0; ii<= 3; ii++ ) {
  53. randy = Math.floor(Math.random() * (9 - 0));
  54. randyi = randyi + randy.toString();
  55. }
  56. randyi = "T"+randyi;
  57. return randyi;
  58. }
  59. function PATCH_003_Modif_SA(){
  60. Rand1 = Math.floor(Math.random() * (9 - 0));
  61. dataset.getdata();
  62. dataset1.getdata();
  63. Delay(3000);
  64. //Clicks the 'button' button.
  65. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeParticipantcomp.shadowroot.textnodeParticipanttextcomp.shadowroot.textnodeAddNew.shadowroot.button.ClickButton();
  66. //Delays the test execution for the specified time period.
  67. Delay(3000);
  68. //Clicks the 'textbox' control.
  69. Aliases.browser.page1011261948080.textnode3.shadowroot.textnodeTxtsearchkeyword.shadowroot.textbox.Click();
  70. //Delays the test execution for the specified time period.
  71. Delay(3000);
  72. //Sets the text 'Testing SA3483' in the 'textbox' text editor.
  73. Aliases.browser.page1011261948080.textnode3.shadowroot.textnodeTxtsearchkeyword.shadowroot.textbox.SetText("Testing SA3483");
  74. //Delays the test execution for the specified time period.
  75. Delay(3000);
  76. //Clicks the 'button' button.
  77. Aliases.browser.page1011261948080.textnode3.shadowroot.textnodeBtnsearch.shadowroot.button.ClickButton();
  78. //Delays the test execution for the specified time period.
  79. Delay(3000);
  80. //Clicks the 'textnode1' control.
  81. Aliases.browser.page1011261948080.textnode3.shadowroot.textnode1.Click();
  82. //Delays the test execution for the specified time period.
  83. Delay(3000);
  84. //Performs a single click on the specified button.
  85. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeParticipantcomp.shadowroot.textnodeBtnsearchstatus.shadowroot.button.ClickButton();
  86. //Delays the test execution for the specified time period.
  87. Delay(3000);
  88. //Clicks the 'textbox' control.
  89. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtsid.shadowroot.textbox.Click();
  90. //Delays the test execution for the specified time period.
  91. Delay(3000);
  92. //Enters '^a' in the 'textbox' object.
  93. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtsid.shadowroot.textbox.Keys("^a");
  94. //Delays the test execution for the specified time period.
  95. Delay(3000);
  96. //Sets the text '7654311234456' in the 'textbox' text editor.
  97. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtsid.shadowroot.textbox.SetText("S"+data[0]);
  98. //Delays the test execution for the specified time period.
  99. Delay(3000);
  100. //Clicks the 'textbox2' control.
  101. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtbusinessregistrationc.shadowroot.textbox2.Click();
  102. //Delays the test execution for the specified time period.
  103. Delay(3000);
  104. //Enters '^a' in the 'textbox2' object.
  105. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtbusinessregistrationc.shadowroot.textbox2.Keys("^a");
  106. //Delays the test execution for the specified time period.
  107. Delay(3000);
  108. //Simulates one or several keypresses.
  109. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtbusinessregistrationc.shadowroot.textbox2.Keys("MDF"+data[0]);
  110. //Delays the test execution for the specified time period.
  111. Delay(3000);
  112. //Clicks the 'textbox2' control.
  113. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtnationalregistrationn.shadowroot.textbox2.Click();
  114. //Delays the test execution for the specified time period.
  115. Delay(3000);
  116. //Enters '^a' in the 'textbox2' object.
  117. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtnationalregistrationn.shadowroot.textbox2.Keys("^a");
  118. //Delays the test execution for the specified time period.
  119. Delay(3000);
  120. //Simulates one or several keypresses.
  121. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtnationalregistrationn.shadowroot.textbox2.Keys("DF"+data[0]);
  122. //Delays the test execution for the specified time period.
  123. Delay(3000);
  124. //Clicks the 'textbox2' control.
  125. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtlicenseno.shadowroot.textbox2.Click();
  126. //Delays the test execution for the specified time period.
  127. Delay(3000);
  128. //Enters '^a' in the 'textbox2' object.
  129. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtlicenseno.shadowroot.textbox2.Keys("^a");
  130. //Delays the test execution for the specified time period.
  131. Delay(3000);
  132. //Simulates one or several keypresses.
  133. Aliases.browser.page1011261948080.textnode.shadowroot.textnode.shadowroot.textnodeGeneralinformationcomp.shadowroot.textnodeTxtlicenseno.shadowroot.textbox2.Keys("MF"+data[0]);
  134. //Delays the test execution for the specified time period.
  135. Delay(3000);
  136. }