From 90d1daf1540a63e662cade8e448f248d06f12126 Mon Sep 17 00:00:00 2001 From: PAN Lei Date: Wed, 8 Nov 2023 11:22:16 +0100 Subject: [PATCH] support moto g51 --- src/findTextWithOpenCV.js | 1 - src/workers/CommandorPage.js | 11 +++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/findTextWithOpenCV.js b/src/findTextWithOpenCV.js index c6e4baa..ba26b4a 100644 --- a/src/findTextWithOpenCV.js +++ b/src/findTextWithOpenCV.js @@ -1,7 +1,6 @@ const path = require('path'); const fs = require('fs'); const { cv, drawBlueRect } = require('opencv4nodejs/ut'); -// const { extractResults } = require('./dnn/ssdUtils'); if (!cv.xmodules.dnn) { throw new Error('exiting: opencv4nodejs compiled without dnn module'); diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index a57b493..e74e2ed 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -548,16 +548,9 @@ class CommandorPage { async clickValid() { logWithDevice("clickValid() called.", this.device); await delay(getRandomWaitTime()) + this.isFillingFields = false try { if (!this.page.isClosed()) { - // if (!this.isTerminated && !this.page.isClosed()) { - // this.page.evaluate(() => { - // let element = document.getElementsByClassName("btn")[0]; - // if (typeof element !== 'undefined') - // document.getElementsByClassName("btn")[0].focus(); - // }) - // } - // await delay(getRandomWaitTime()) if (!this.page.isClosed()) { try { // remove debug flag @@ -975,6 +968,8 @@ class CommandorPage { await this.tapForDevice(this.device, 530, 970) } else if (this.device.model() === "ONEPLUS A6000") { await this.device.shell("input tap " + 530 + " " + 1064) + } else if (this.device.model() === "moto g51 5G") { + await this.tapForDevice(this.device, 500, 1080) } else if (this.device.model() === "M2006C3LG" || this.device.model() === "220233L2G") { await this.tapForDevice(this.device, 350, 777) } else if (this.device.model() === "KB2003" || this.device.model() === "DE2117") {