PATCH_032.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 xdata3(param2) {
  34. var randy3 = "";
  35. for (ii = 0; ii<= 3; ii++ ) {
  36. randy4 = Math.floor(Math.random() * (9 - 0));
  37. randy3 = randy3 + randy4.toString();
  38. }
  39. var sub = "";
  40. for (i = 0; i<= 9; i++ ) {
  41. Rand4 = Math.floor(Math.random() * (9 - 0));
  42. sub = sub + Rand4.toString();
  43. }
  44. this.getdata = function datacollection() {
  45. data3 = [sub, randy4]
  46. }
  47. }
  48. const dataset2 = new xdata3();
  49. function checkCode() {
  50. for (i = 0; i <= 10; i++){
  51. if (Aliases.PTW.dlg.btnOK.Exists) {
  52. Aliases.PTW.dlg.btnOK.ClickButton();
  53. let wizardControl2_1 = Aliases.PTW.Wizard2.WizardControl2;
  54. let panel = wizardControl2_1.panel2;
  55. panel.panelLeft.panelStepLabels.CondicoLabel3.Click(29, 11);
  56. Delay(2000)
  57. condicoPlainTextBox.SetText(generateCode());
  58. Delay(2000)
  59. wizardControl2_1.kryptonGroupButtons.tableLayoutPanel2.flowLayoutPanel2.tableLayoutPanel1.btnFinish.ClickButton();
  60. Delay(15000)
  61. }else {
  62. break;
  63. }
  64. }
  65. }
  66. function generateCode(randyi) {
  67. var randyi = "";
  68. for (ii = 0; ii<= 3; ii++ ) {
  69. randy = Math.floor(Math.random() * (9 - 0));
  70. randyi = randyi + randy.toString();
  71. }
  72. randyi = "T"+randyi;
  73. return randyi;
  74. }
  75. function PATCH_032_SA_CREATE_FUND(){
  76. Rand1 = Math.floor(Math.random() * (9 - 0));
  77. dataset.getdata();
  78. dataset1.getdata();
  79. dataset2.getdata();
  80. //Clicks the 'textbox' control.
  81. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdcrud.shadowroot.textnode5.shadowroot.textbox.Click();
  82. //Delays the test execution for the specified time period.
  83. Delay(3000);
  84. //Sets the text 'Testing 12345' in the 'textbox' text editor.
  85. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdcrud.shadowroot.textnode5.shadowroot.textbox.SetText("TESTING");
  86. //Delays the test execution for the specified time period.
  87. Delay(3000);
  88. //Clicks the 'textbox' control.
  89. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdcrud.shadowroot.textnode6.shadowroot.textbox.Click();
  90. //Delays the test execution for the specified time period.
  91. Delay(3000);
  92. //Sets the text '1234567' in the 'textbox' text editor.
  93. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdcrud.shadowroot.textnode6.shadowroot.textbox.SetText("1"+data[0]);
  94. //Delays the test execution for the specified time period.
  95. Delay(3000);
  96. //Clicks the 'textbox' control.
  97. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdcrud.shadowroot.textnode7.shadowroot.textbox.Click();
  98. //Delays the test execution for the specified time period.
  99. Delay(3000);
  100. //Sets the text 'Testing 123456' in the 'textbox' text editor.
  101. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdcrud.shadowroot.textnode7.shadowroot.textbox.SetText("Testing "+data[1]);
  102. //Delays the test execution for the specified time period.
  103. Delay(3000);
  104. }