PATCH_011.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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_011_CREATE_FUND_PART_I(){
  76. Rand1 = Math.floor(Math.random() * (9 - 0));
  77. dataset.getdata();
  78. dataset1.getdata();
  79. dataset2.getdata();
  80. //Clicks the 'button' button.
  81. Aliases.browser.page1011261948080.textnode.shadowroot.textnode6.shadowroot.textnodeAddNew.shadowroot.button.ClickButton();
  82. //Delays the test execution for the specified time period.
  83. Delay(3000);
  84. //Simulates a user action over the area that contains the recognized text.
  85. OCR.Recognize(Aliases.browser.page1011261948080.textnode5.shadowroot.labelImCode).BlockByText("IM Code").Click();
  86. //Delays the test execution for the specified time period.
  87. Delay(3000);
  88. //Clicks the 'textbox' control.
  89. Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeTxtSearch.shadowroot.textbox.Click();
  90. //Delays the test execution for the specified time period.
  91. Delay(3000);
  92. //Sets the text 'LG002' in the 'textbox' text editor.
  93. Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeTxtSearch.shadowroot.textbox.SetText("LG002");
  94. //Delays the test execution for the specified time period.
  95. Delay(3000);
  96. //Clicks the 'button' button.
  97. Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeBtnSearch.shadowroot.button.ClickButton();
  98. //Delays the test execution for the specified time period.
  99. Delay(7000);
  100. //Double-clicks the 'cellVaadinGridCell9' object.
  101. Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeGrdResults.shadowroot.cellVaadinGridCell9.DblClick(69, 30);
  102. //Delays the test execution for the specified time period.
  103. Delay(3000);
  104. //Clicks the 'textbox' control.
  105. Aliases.browser.page1011261948080.textnode.shadowroot.textnode7.shadowroot.textbox.Click();
  106. //Delays the test execution for the specified time period.
  107. Delay(3000);
  108. //Sets the text 'FUND TESTING ' in the 'textbox' text editor.
  109. Aliases.browser.page1011261948080.textnode.shadowroot.textnode7.shadowroot.textbox.SetText("FUND TESTING "+data[1]);
  110. //Delays the test execution for the specified time period.
  111. Delay(1500);
  112. }
  113. function PATCH_011_CREATE_FUND_PART_II(){
  114. Rand1 = Math.floor(Math.random() * (9 - 0));
  115. dataset.getdata();
  116. dataset1.getdata();
  117. dataset2.getdata();
  118. //Simulates one or several keypresses.
  119. //Aliases.browser.page1011261948080.textnode.shadowroot.textnode7.shadowroot.textbox.Keys(aqConvert.DateTimeToFormatStr(aqDateTime.Today(), "%Y%m%d"));
  120. //Delays the test execution for the specified time period.
  121. Delay(3000);
  122. //Clicks the 'textbox' control.
  123. Aliases.browser.page1011261948080.textnode.shadowroot.textnode8.shadowroot.textbox.Click();
  124. //Delays the test execution for the specified time period.
  125. Delay(3000);
  126. //Sets the text '1234567890' in the 'textbox' text editor.
  127. Aliases.browser.page1011261948080.textnode.shadowroot.textnode8.shadowroot.textbox.SetText(data2[0]);
  128. //Delays the test execution for the specified time period.
  129. Delay(3000);
  130. //Clicks the 'textbox' control.
  131. Aliases.browser.page1011261948080.textnode.shadowroot.textnode9.shadowroot.textbox.Click();
  132. //Delays the test execution for the specified time period.
  133. Delay(3000);
  134. //Sets the text 'FUNDTE' in the 'textbox' text editor.
  135. Aliases.browser.page1011261948080.textnode.shadowroot.textnode9.shadowroot.textbox.SetText("FD"+data[1]);
  136. //Delays the test execution for the specified time period.
  137. Delay(3000);
  138. //Clicks the 'textbox' control.
  139. Aliases.browser.page1011261948080.textnode.shadowroot.textnode10.shadowroot.textbox.Click();
  140. //Delays the test execution for the specified time period.
  141. Delay(3000);
  142. //Simulates one or several keypresses.
  143. Aliases.browser.page1011261948080.textnode.shadowroot.textnode10.shadowroot.textbox.Keys(data3[0]);
  144. //Delays the test execution for the specified time period.
  145. Delay(3000);
  146. //Clicks the 'textbox' control.
  147. Aliases.browser.page1011261948080.textnode.shadowroot.textnode11.shadowroot.textbox.Click();
  148. //Delays the test execution for the specified time period.
  149. Delay(3000);
  150. //Simulates one or several keypresses.
  151. Aliases.browser.page1011261948080.textnode.shadowroot.textnode11.shadowroot.textbox.Keys(data[0]);
  152. //Delays the test execution for the specified time period.
  153. Delay(3000);
  154. //Clicks the 'textbox' control.
  155. Aliases.browser.page1011261948080.textnode.shadowroot.textnode12.shadowroot.textbox.Click();
  156. //Delays the test execution for the specified time period.
  157. Delay(3000);
  158. //Simulates one or several keypresses.
  159. Aliases.browser.page1011261948080.textnode.shadowroot.textnode12.shadowroot.textbox.Keys("Fund Testing "+data[1]);
  160. //Delays the test execution for the specified time period.
  161. Delay(3000);
  162. //Clicks the 'textbox' control.
  163. Aliases.browser.page1011261948080.textnode.shadowroot.textnode13.shadowroot.textbox.Click();
  164. //Delays the test execution for the specified time period.
  165. Delay(3000);
  166. //Simulates one or several keypresses.
  167. Aliases.browser.page1011261948080.textnode.shadowroot.textnode13.shadowroot.textbox.Keys(data[0]);
  168. //Delays the test execution for the specified time period.
  169. Delay(3000);
  170. //Clicks the 'textbox' control.
  171. Aliases.browser.page1011261948080.textnode.shadowroot.textnode14.shadowroot.textbox.Click();
  172. //Delays the test execution for the specified time period.
  173. Delay(3000);
  174. //Simulates one or several keypresses.
  175. Aliases.browser.page1011261948080.textnode.shadowroot.textnode14.shadowroot.textbox.Keys(data2[0]);
  176. //Delays the test execution for the specified time period.
  177. Delay(3000);
  178. //Clicks the 'textbox' control.
  179. Aliases.browser.page1011261948080.textnode.shadowroot.textnode15.shadowroot.textbox.Click();
  180. //Delays the test execution for the specified time period.
  181. Delay(3000);
  182. //Simulates one or several keypresses.
  183. Aliases.browser.page1011261948080.textnode.shadowroot.textnode15.shadowroot.textbox.Keys(data3[0]);
  184. //Delays the test execution for the specified time period.
  185. Delay(3000);
  186. //Clicks the 'textbox' control.
  187. Aliases.browser.page1011261948080.textnode.shadowroot.textnode16.shadowroot.textbox.Click();
  188. //Delays the test execution for the specified time period.
  189. Delay(3000);
  190. //Simulates one or several keypresses.
  191. Aliases.browser.page1011261948080.textnode.shadowroot.textnode16.shadowroot.textbox.Keys(data3[0]);
  192. //Delays the test execution for the specified time period.
  193. Delay(3000);
  194. //Clicks the 'textbox' control.
  195. Aliases.browser.page1011261948080.textnode.shadowroot.textnode17.shadowroot.textbox.Click();
  196. //Delays the test execution for the specified time period.
  197. Delay(3000);
  198. //Sets the text '12345678' in the 'textbox' text editor.
  199. Aliases.browser.page1011261948080.textnode.shadowroot.textnode17.shadowroot.textbox.SetText(data[0]);
  200. //Delays the test execution for the specified time period.
  201. Delay(3000);
  202. //Clicks the 'textbox' control.
  203. Aliases.browser.page1011261948080.textnode.shadowroot.textnode18.shadowroot.textbox.Click();
  204. //Delays the test execution for the specified time period.
  205. Delay(3000);
  206. //Sets the text 'TESTING FUND 12345' in the 'textbox' text editor.
  207. Aliases.browser.page1011261948080.textnode.shadowroot.textnode18.shadowroot.textbox.SetText("TESTING FUND "+data[1]);
  208. //Delays the test execution for the specified time period.
  209. Delay(3000);
  210. //Clicks the 'textbox' control.
  211. Aliases.browser.page1011261948080.textnode.shadowroot.textnode19.shadowroot.textbox.Click();
  212. //Delays the test execution for the specified time period.
  213. Delay(3000);
  214. //Sets the text '2' in the 'textbox' text editor.
  215. Aliases.browser.page1011261948080.textnode.shadowroot.textnode19.shadowroot.textbox.SetText(Rand1);
  216. //Delays the test execution for the specified time period.
  217. Delay(3000);
  218. //Clicks the 'textbox' control.
  219. Aliases.browser.page1011261948080.textnode.shadowroot.textnode20.shadowroot.textbox.Click();
  220. //Delays the test execution for the specified time period.
  221. Delay(3000);
  222. //Sets the text '2' in the 'textbox' text editor.
  223. Aliases.browser.page1011261948080.textnode.shadowroot.textnode20.shadowroot.textbox.SetText(Rand1);
  224. //Delays the test execution for the specified time period.
  225. Delay(3000);
  226. //Clicks the 'textbox' control.
  227. Aliases.browser.page1011261948080.textnode.shadowroot.textnode21.shadowroot.textbox.Click();
  228. //Delays the test execution for the specified time period.
  229. Delay(3000);
  230. //Sets the text '2' in the 'textbox' text editor.
  231. Aliases.browser.page1011261948080.textnode.shadowroot.textnode21.shadowroot.textbox.SetText(Rand1);
  232. //Delays the test execution for the specified time period.
  233. Delay(3000);
  234. //Clicks the 'textbox' control.
  235. Aliases.browser.page1011261948080.textnode.shadowroot.textnode22.shadowroot.textbox.Click();
  236. //Delays the test execution for the specified time period.
  237. Delay(3000);
  238. //Sets the text '2' in the 'textbox' text editor.
  239. Aliases.browser.page1011261948080.textnode.shadowroot.textnode22.shadowroot.textbox.SetText(Rand1);
  240. //Delays the test execution for the specified time period.
  241. Delay(3000);
  242. //Clicks the 'textbox' control.
  243. Aliases.browser.page1011261948080.textnode.shadowroot.textnode23.shadowroot.textbox.Click();
  244. //Delays the test execution for the specified time period.
  245. Delay(3000);
  246. //Sets the text '2' in the 'textbox' text editor.
  247. Aliases.browser.page1011261948080.textnode.shadowroot.textnode23.shadowroot.textbox.SetText(Rand1);
  248. //Delays the test execution for the specified time period.
  249. Delay(3000);
  250. //Clicks the 'textbox' control.
  251. Aliases.browser.page1011261948080.textnode.shadowroot.textnode24.shadowroot.textbox.Click();
  252. //Delays the test execution for the specified time period.
  253. Delay(3000);
  254. //Sets the text '2' in the 'textbox' text editor.
  255. Aliases.browser.page1011261948080.textnode.shadowroot.textnode24.shadowroot.textbox.SetText(Rand1);
  256. //Delays the test execution for the specified time period.
  257. Delay(3000);
  258. }
  259. function PATCH_011_CREATE_FUND_PART_III(){
  260. Rand1 = Math.floor(Math.random() * (9 - 0));
  261. dataset.getdata();
  262. dataset1.getdata();
  263. dataset2.getdata();
  264. //Clicks the 'cellVaadinGridCell4' control.
  265. //Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnodeGrid.shadowroot.cellVaadinGridCell4.Click();
  266. //Delays the test execution for the specified time period.
  267. //Delay(5000);
  268. //Sets the text 'JLN. TESTING' in the 'textbox2' text editor.
  269. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode.shadowroot.textbox2.SetText("JLN. FUND TESTING "+data[1]);
  270. //Delays the test execution for the specified time period.
  271. Delay(3000);
  272. //Clicks the 'textbox2' control.
  273. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode2.shadowroot.textbox2.Click();
  274. //Delays the test execution for the specified time period.
  275. Delay(3000);
  276. //Sets the text '12345678' in the 'textbox2' text editor.
  277. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode2.shadowroot.textbox2.SetText("1"+data[1]);
  278. //Delays the test execution for the specified time period.
  279. Delay(3000);
  280. //Clicks the 'panelVaadinSelectTextFieldInput' control.
  281. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode3.shadowroot.textnode.shadowroot.panelVaadinSelectTextFieldInput.Click();
  282. //Delays the test execution for the specified time period.
  283. Delay(3000);
  284. //Clicks the 'textnodeDkiJakarta' control.
  285. Aliases.browser.page1011261948080.textnodeDkiJakarta.Click();
  286. //Delays the test execution for the specified time period.
  287. Delay(3000);
  288. //Clicks the 'table' control.
  289. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnodeGrid.shadowroot.table.Click();
  290. //Delays the test execution for the specified time period.
  291. Delay(3000);
  292. //Clicks the 'panelToggle' control.
  293. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode4.shadowroot.panelToggle.Click();
  294. //Delays the test execution for the specified time period.
  295. Delay(3000);
  296. //Clicks the 'textnodeJakartaSelatan' control.
  297. Aliases.browser.page1011261948080.textnodeJakartaSelatan.Click();
  298. //Delays the test execution for the specified time period.
  299. Delay(3000);
  300. //Clicks the 'button' button.
  301. Aliases.browser.page1011261948080.textnode.shadowroot.textnodeGrdAddressInformation.shadowroot.textnode5.shadowroot.textnodeAddNew.shadowroot.button.ClickButton();
  302. //Delays the test execution for the specified time period.
  303. Delay(3000);
  304. //Clicks the 'textbox2' control.
  305. Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeTxtSearch.shadowroot.textbox2.Click();
  306. //Delays the test execution for the specified time period.
  307. Delay(3000);
  308. //Sets the text 'Indonesia' in the 'textbox2' text editor.
  309. Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeTxtSearch.shadowroot.textbox2.SetText("Indonesia");
  310. //Delays the test execution for the specified time period.
  311. Delay(3000);
  312. //Clicks the 'button' button.
  313. Aliases.browser.page1011261948080.textnode5.shadowroot.textnodeBtnSearch.shadowroot.button.ClickButton();
  314. //Delays the test execution for the specified time period.
  315. Delay(3000);
  316. //Double-clicks the 'textnode1' object.
  317. Aliases.browser.page1011261948080.textnode5.shadowroot.textnode1.DblClick(114, 12);
  318. //Delays the test execution for the specified time period.
  319. Delay(3000);
  320. }