support chrome

This commit is contained in:
2024-09-21 12:48:23 +02:00
parent 6a0e37c166
commit ff9c9bc07d
3 changed files with 13 additions and 8 deletions
+10 -5
View File
@@ -89,8 +89,8 @@ class CommandorPage {
this.port = port; this.port = port;
this.sender = sender; this.sender = sender;
this.ocrChecker = new OCRChecker(this.device, this.contact); this.ocrChecker = new OCRChecker(this.device, this.contact);
this.browserPackageName = "com.brave.browser"; // this.browserPackageName = "com.brave.browser";
// this.browserPackageName = "com.android.chrome"; this.browserPackageName = "com.android.chrome";
this.isFillingFields = false; this.isFillingFields = false;
this.isTerminated = false; this.isTerminated = false;
this.cguChecked = false; this.cguChecked = false;
@@ -1142,8 +1142,10 @@ class CommandorPage {
OCRResult.NEED_TO_CLICK_LATE_BTN OCRResult.NEED_TO_CLICK_LATE_BTN
: :
await this.tapLaterBtn() await this.tapLaterBtn()
this.firstStart = true; await delay(5000)
await this.loadPage() await this.checkResultWithOcr();
// this.firstStart = true;
// await this.loadPage()
break; break;
case case
OCRResult.CLOSED OCRResult.CLOSED
@@ -1460,7 +1462,10 @@ class CommandorPage {
} else if (model === "Mi Note 10") { } else if (model === "Mi Note 10") {
this.device.shell("input tap " + 550 + " " + 1920) this.device.shell("input tap " + 550 + " " + 1920)
} else if (model === "ONEPLUS A6000") { } else if (model === "ONEPLUS A6000") {
this.device.shell("input tap " + 535 + " " + 1945) log("will tap on " + model + ": " + 535 + " " + 1930)
this.device.shell("input tap " + 535 + " " + 1930)
await delay(1000);
this.device.shell("input tap " + 535 + " " + 1930)
} else if (model === "22041219PG") { } else if (model === "22041219PG") {
this.device.shell("input tap " + 540 + " " + 1985) this.device.shell("input tap " + 540 + " " + 1985)
} else if (model === "21091116C") { } else if (model === "21091116C") {
+2 -2
View File
@@ -5,8 +5,8 @@ const axios = require("axios");
const {v4: uuidv4} = require('uuid'); const {v4: uuidv4} = require('uuid');
const OCRResult = require("../models/OCRResult"); const OCRResult = require("../models/OCRResult");
// const DEEPLEARNING_CAPTCHA_HOST = "http://appointment.lpaconsulting.fr:9000" const DEEPLEARNING_CAPTCHA_HOST = "http://appointment.lpaconsulting.fr:9000"
const DEEPLEARNING_CAPTCHA_HOST = "http://192.168.1.200:9000" // const DEEPLEARNING_CAPTCHA_HOST = "http://192.168.1.200:9000"
function delay(delayInMs) { function delay(delayInMs) {
return new Promise(resolve => { return new Promise(resolve => {
+1 -1
View File
@@ -2,6 +2,6 @@ const {startBookWithNumbers} = require('./src/appointment')
const {homedir} = require("os"); const {homedir} = require("os");
homeDir = homedir() homeDir = homedir()
//faubourg, random //faubourg, random
startBookWithNumbers(0, 10000, "random", homeDir + "/Desktop/contact_list_2024-09-11.xlsx", true, false).then((r) => { startBookWithNumbers(0, 10000, "random", homeDir + "/Desktop/16_04_to_test.xlsx", true, false).then((r) => {
console.log(r) console.log(r)
}) })