Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e03bc59ca | |||
| 3e374f10fa | |||
| 1aec686c0b | |||
| 5a2b88139e | |||
| 6ce3a56ce2 | |||
| f3a7188b31 | |||
| 24f95842ba | |||
| 9657007a5b | |||
| 9d70bf7097 | |||
| 9cfa650b31 | |||
| 87eca37d8b | |||
| a04ec8373d | |||
| 842f87c784 |
+17
-5
@@ -1,6 +1,10 @@
|
|||||||
const {exec} = require("child_process");
|
const {exec} = require("child_process");
|
||||||
|
|
||||||
DEVICE_REGEX = "(^[a-z0-9A-Z]*) .* model:([a-z0-9A-Z_]+)"
|
// DEVICE_REGEX = "(^[a-z0-9A-Z]*) .* model:([a-z0-9A-Z_]+)"
|
||||||
|
DEVICE_REGEX = "(^[a-z0-9A-Z-.:]*) .* model:([a-z0-9A-Z_]+)"
|
||||||
|
|
||||||
|
// DEVICE_REGEX = "(^[a-z0-9A-Z-]*) .* model:([a-z0-9A-Z_]+)"
|
||||||
|
|
||||||
|
|
||||||
async function devices() {
|
async function devices() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@@ -23,10 +27,11 @@ async function devices() {
|
|||||||
const o = currentLine.split('\t')
|
const o = currentLine.split('\t')
|
||||||
findResult = currentLine.match(DEVICE_REGEX)
|
findResult = currentLine.match(DEVICE_REGEX)
|
||||||
console.log(findResult)
|
console.log(findResult)
|
||||||
try{
|
try {
|
||||||
result.push(new AndroidDevice(findResult[1], findResult[2]));}
|
result.push(new AndroidDevice(findResult[1], findResult[2]));
|
||||||
catch(e){
|
} catch (e) {
|
||||||
console.log(e)}
|
console.log(e)
|
||||||
|
}
|
||||||
console.log(result[i])
|
console.log(result[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,6 +62,13 @@ class AndroidDevice {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async clearApp(packageName) {
|
||||||
|
let cmd = `adb -s ${this.serial} shell pm clear ${packageName}`
|
||||||
|
console.log("cmd is " + cmd)
|
||||||
|
await exec(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
shell(cmd) {
|
shell(cmd) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
exec("adb -s " + this.serial + " shell " + cmd, (error, stdout, stderr) => {
|
exec("adb -s " + this.serial + " shell " + cmd, (error, stdout, stderr) => {
|
||||||
|
|||||||
+37
-20
@@ -8,17 +8,17 @@ const {Sender} = require("./queue/Sender");
|
|||||||
const {devices} = require("./android/adb");
|
const {devices} = require("./android/adb");
|
||||||
const mongoManager = new MongoManager();
|
const mongoManager = new MongoManager();
|
||||||
const SEVEN_DAYS_IN_S = 3600 * 24 * 7;
|
const SEVEN_DAYS_IN_S = 3600 * 24 * 7;
|
||||||
// const NINETY_DAYS_IN_S = 3600 * 24 * 30 * 3;
|
|
||||||
const NINETY_DAYS_IN_S = 30 * 3;
|
const NINETY_DAYS_IN_S = 30 * 3;
|
||||||
let excelUtil = new ExcelUtil();
|
let excelUtil = new ExcelUtil();
|
||||||
let collectionName = formatDate(new Date())
|
let collectionName = formatDate(new Date())
|
||||||
let excludeMode = DeviceExcludeMode.ZERO
|
let includeMode = DeviceExcludeMode.ZERO
|
||||||
|
// let includeMode = DeviceExcludeMode.APPOINTMENT
|
||||||
|
|
||||||
let three_to_excludes = []
|
let three_to_include = []
|
||||||
let four_to_excludes = ["bec11752", "4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518"]
|
let four_to_include = ["bec11752", "4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518"]
|
||||||
let seven_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518", "bec11752", "fuljaueqguugf6pn", "EPHUT20825001518"]
|
let seven_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518", "bec11752", "fuljaueqguugf6pn", "EPHUT20825001518"]
|
||||||
let six_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518", "bec11752", "07fbd156", "NFD669QK8XNFSCNN", "6X494TTWQGFALB79", "71a0371d", "YP6HVKLFE67T598L"]
|
let appointment_to_include = ["bec11752", "07fbd156", "71a0371d", "J4AXB761H2322WJ", "W8GMFELRHIKZS84T", "ZY32GLBN5P", "ZY32GVW4NC", "becb6e99", "b41c1b72"]
|
||||||
let nine_to_excludes = ["bec11752", "4e8ca027", "hi7ljr5xduyt9pfi", "47e7e36b", "p7d6nbw8cu7duous", "njzxojhim7gedyvw", "fmiz5pa6rsx4u4ts", "fuljaueqguugf6pn", "EPHUT20825001518"]
|
let nine_to_include = ["bec11752", "4e8ca027", "hi7ljr5xduyt9pfi", "47e7e36b", "p7d6nbw8cu7duous", "njzxojhim7gedyvw", "fmiz5pa6rsx4u4ts", "fuljaueqguugf6pn", "EPHUT20825001518"]
|
||||||
let for_scrpay = ["07fbd156", "47e7e36b", "4f55c3d4", "5ac879a2", "69db59f0", "71a0371d", "774687ff", "7b71fb20", "8f76f9e7", "99cyfiaebqcy6poj", "EPHUT20825001518", "J4AXB761H2322WJ", "W8GMFELRHIKZS84T", "ai9xv8hy599hvkee", "b41c1b72", "bec11752", "becb6e99", "c3ba032e", "d54e946", "fmiz5pa6rsx4u4ts", "fuljaueqguugf6pn", "fy65eqs4wkvcpf9h", "hi7ljr5xduyt9pfi", "njzxojhim7gedyvw", "p7d6nbw8cu7duous"]
|
let for_scrpay = ["07fbd156", "47e7e36b", "4f55c3d4", "5ac879a2", "69db59f0", "71a0371d", "774687ff", "7b71fb20", "8f76f9e7", "99cyfiaebqcy6poj", "EPHUT20825001518", "J4AXB761H2322WJ", "W8GMFELRHIKZS84T", "ai9xv8hy599hvkee", "b41c1b72", "bec11752", "becb6e99", "c3ba032e", "d54e946", "fmiz5pa6rsx4u4ts", "fuljaueqguugf6pn", "fy65eqs4wkvcpf9h", "hi7ljr5xduyt9pfi", "njzxojhim7gedyvw", "p7d6nbw8cu7duous"]
|
||||||
attributedPorts = []
|
attributedPorts = []
|
||||||
const device_port_info = new Map();
|
const device_port_info = new Map();
|
||||||
@@ -118,6 +118,16 @@ function shuffle(array) {
|
|||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getContactListForDevice(device, allContactList) {
|
||||||
|
let contactList = [];
|
||||||
|
allContactList.forEach((contact) => {
|
||||||
|
if (contact.serial === device.serial) {
|
||||||
|
contactList.push(contact)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return contactList;
|
||||||
|
}
|
||||||
|
|
||||||
async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathToExcelFile = '/Users/lpan/Desktop/contact_all.xlsx', audioAnalyse = true, alertBeep = false) {
|
async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathToExcelFile = '/Users/lpan/Desktop/contact_all.xlsx', audioAnalyse = true, alertBeep = false) {
|
||||||
console.log("startBookWithNumbers() called, with alertBeep:" + alertBeep)
|
console.log("startBookWithNumbers() called, with alertBeep:" + alertBeep)
|
||||||
console.log("startBookWithNumbers() called, with audioAnalyse:" + audioAnalyse)
|
console.log("startBookWithNumbers() called, with audioAnalyse:" + audioAnalyse)
|
||||||
@@ -146,7 +156,7 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT
|
|||||||
} else {
|
} else {
|
||||||
attributedPort = startPort;
|
attributedPort = startPort;
|
||||||
startPort++;
|
startPort++;
|
||||||
let cmd = 'adb -s ' + device.serial + " forward tcp:" + attributedPort + " localabstract:chrome_devtools_remote";
|
let cmd = 'adb -s \"' + device.serial + "\" forward tcp:" + attributedPort + " localabstract:chrome_devtools_remote";
|
||||||
console.log("cmd is " + cmd);
|
console.log("cmd is " + cmd);
|
||||||
const output = execSync(cmd, {encoding: 'utf-8'}); // the default is 'buffer'
|
const output = execSync(cmd, {encoding: 'utf-8'}); // the default is 'buffer'
|
||||||
console.log('Output was:\n', output);
|
console.log('Output was:\n', output);
|
||||||
@@ -170,28 +180,35 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT
|
|||||||
alert("未找到连接的设备");
|
alert("未找到连接的设备");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let device_to_excludes = three_to_excludes;
|
let device_to_excludes = three_to_include;
|
||||||
if (excludeMode === DeviceExcludeMode.FOUR) {
|
if (includeMode === DeviceExcludeMode.FOUR) {
|
||||||
device_to_excludes = four_to_excludes;
|
device_to_excludes = four_to_include;
|
||||||
} else if (excludeMode === DeviceExcludeMode.THREE) {
|
} else if (includeMode === DeviceExcludeMode.THREE) {
|
||||||
device_to_excludes = three_to_excludes;
|
device_to_excludes = three_to_include;
|
||||||
} else if (excludeMode === DeviceExcludeMode.NINE) {
|
} else if (includeMode === DeviceExcludeMode.NINE) {
|
||||||
device_to_excludes = nine_to_excludes;
|
device_to_excludes = nine_to_include;
|
||||||
} else if (excludeMode === DeviceExcludeMode.SEVEN) {
|
} else if (includeMode === DeviceExcludeMode.SEVEN) {
|
||||||
device_to_excludes = seven_to_excludes
|
device_to_excludes = seven_to_excludes
|
||||||
} else if (excludeMode === DeviceExcludeMode.SIX) {
|
} else if (includeMode === DeviceExcludeMode.APPOINTMENT) {
|
||||||
device_to_excludes = six_to_excludes
|
device_to_excludes = appointment_to_include
|
||||||
} else if (excludeMode === DeviceExcludeMode.ZERO) {
|
} else if (includeMode === DeviceExcludeMode.ZERO) {
|
||||||
device_to_excludes = []
|
device_to_excludes = []
|
||||||
}
|
}
|
||||||
filteredDeviceList = devices.filter(device => !device_to_excludes.includes(device.serial))
|
if (includeMode === DeviceExcludeMode.ZERO) {
|
||||||
|
filteredDeviceList = devices
|
||||||
|
} else
|
||||||
|
filteredDeviceList = devices.filter(device => device_to_excludes.includes(device.serial))
|
||||||
let segmentNumber = listWithoutBlackContact.length / filteredDeviceList.length;
|
let segmentNumber = listWithoutBlackContact.length / filteredDeviceList.length;
|
||||||
console.log("connected device number:" + filteredDeviceList.length)
|
console.log("connected device number:" + filteredDeviceList.length)
|
||||||
console.log("segmentNumber:" + segmentNumber)
|
console.log("segmentNumber:" + segmentNumber)
|
||||||
|
listWithoutBlackContact = shuffle(listWithoutBlackContact)
|
||||||
for (let i = 0; i < filteredDeviceList.length; i++) {
|
for (let i = 0; i < filteredDeviceList.length; i++) {
|
||||||
let device = filteredDeviceList[i];
|
let device = filteredDeviceList[i];
|
||||||
let port = startForwordingForDevice(device)
|
let port = startForwordingForDevice(device)
|
||||||
startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), device, sender, selectedStore, audioAnalyse, alertBeep, port);
|
let _contactList = listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1))
|
||||||
|
// let _contactList = getContactListForDevice(device, listWithoutBlackContact)
|
||||||
|
console.log("contactList: for device:" + device.serial + " has " + _contactList.length)
|
||||||
|
startWithList(_contactList, device, sender, selectedStore, audioAnalyse, alertBeep, port);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,12 @@ class ExcelUtil {
|
|||||||
if (store === undefined || store.length === 0) {
|
if (store === undefined || store.length === 0) {
|
||||||
store = "random"
|
store = "random"
|
||||||
}
|
}
|
||||||
let ipCountry = info[5];
|
let serial = info[5];
|
||||||
|
let ipCountry = info[6];
|
||||||
if (ipCountry === undefined || ipCountry.length === 0) {
|
if (ipCountry === undefined || ipCountry.length === 0) {
|
||||||
ipCountry = "FR"
|
ipCountry = "FR"
|
||||||
}
|
}
|
||||||
let newContact = new ContactPojo(phoneNumber, passportNumber, lastName, firstName, mail, store, ipCountry);
|
let newContact = new ContactPojo(phoneNumber, passportNumber, lastName, firstName, mail, store, ipCountry, serial);
|
||||||
contactList.push(newContact);
|
contactList.push(newContact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class ContactPojo {
|
class ContactPojo {
|
||||||
|
|
||||||
constructor(phoneNumber, passportNumber, lastName, firstName, mail, store, ipCountry) {
|
constructor(phoneNumber, passportNumber, lastName, firstName, mail, store, ipCountry, serial) {
|
||||||
this.phoneNumber = phoneNumber;
|
this.phoneNumber = phoneNumber;
|
||||||
this.passportNumber = passportNumber;
|
this.passportNumber = passportNumber;
|
||||||
this.lastName = lastName;
|
this.lastName = lastName;
|
||||||
@@ -8,6 +8,7 @@ class ContactPojo {
|
|||||||
this.mail = mail;
|
this.mail = mail;
|
||||||
this.store = store;
|
this.store = store;
|
||||||
this.ipCountry = ipCountry;
|
this.ipCountry = ipCountry;
|
||||||
|
this.serial = serial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
const DeviceExcludeMode = {
|
const DeviceIncludeMode = {
|
||||||
ZERO: Symbol("ZERO"),
|
ZERO: Symbol("ZERO"),
|
||||||
NINE: Symbol("NINE"),
|
NINE: Symbol("NINE"),
|
||||||
THREE: Symbol("THREE"),
|
THREE: Symbol("THREE"),
|
||||||
SIX: Symbol("SIX"),
|
SIX: Symbol("SIX"),
|
||||||
SEVEN: Symbol("SEVEN"),
|
SEVEN: Symbol("SEVEN"),
|
||||||
|
APPOINTMENT: Symbol("APPOINTMENT"),
|
||||||
FOUR: Symbol("FOUR")
|
FOUR: Symbol("FOUR")
|
||||||
}
|
}
|
||||||
module.exports = DeviceExcludeMode
|
module.exports = DeviceIncludeMode
|
||||||
@@ -21,6 +21,7 @@ const OCRResult = {
|
|||||||
RECAPTCHA_FAILED: Symbol("RECAPTCHA_FAILED"),
|
RECAPTCHA_FAILED: Symbol("RECAPTCHA_FAILED"),
|
||||||
RECAPTCHA_ERROR: Symbol("RECAPTCHA_ERROR"),
|
RECAPTCHA_ERROR: Symbol("RECAPTCHA_ERROR"),
|
||||||
NO_INTERNET: Symbol("NO_INTERNET"),
|
NO_INTERNET: Symbol("NO_INTERNET"),
|
||||||
|
CHROME_NOTIFICATION: Symbol("CHROME_NOTIFICATION"),
|
||||||
BRAVE_SKIP: Symbol("BRAVE_SKIP"),
|
BRAVE_SKIP: Symbol("BRAVE_SKIP"),
|
||||||
BRAVE_PRIVACY: Symbol("BRAVE_PRIVACY"),
|
BRAVE_PRIVACY: Symbol("BRAVE_PRIVACY"),
|
||||||
BRAVE_PRIVACY_PUB: Symbol("BRAVE_PRIVACY_PUB"),
|
BRAVE_PRIVACY_PUB: Symbol("BRAVE_PRIVACY_PUB"),
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ const {exec} = require("child_process");
|
|||||||
const {openUrlWithAdb} = require("../utiles/CmdUtils");
|
const {openUrlWithAdb} = require("../utiles/CmdUtils");
|
||||||
const RequestDataPojo = require("../models/RequestDataPojo");
|
const RequestDataPojo = require("../models/RequestDataPojo");
|
||||||
const {REQUEST_DATA_OBJECT, TEST_QUEUE} = require("../queue/Sender");
|
const {REQUEST_DATA_OBJECT, TEST_QUEUE} = require("../queue/Sender");
|
||||||
// const RDV_URL = "http://192.168.0.44:8000/test_appointment.html"
|
|
||||||
const RDV_URL = "https://rendezvousparis.hermes.com/client/register";
|
const RDV_URL = "https://rendezvousparis.hermes.com/client/register";
|
||||||
const BLANK_URL = "about:blank"
|
const BLANK_URL = "about:blank"
|
||||||
const ERROR_CAPTCHA_UNSOLVABLE = "ERROR_CAPTCHA_UNSOLVABLE";
|
const ERROR_CAPTCHA_UNSOLVABLE = "ERROR_CAPTCHA_UNSOLVABLE";
|
||||||
@@ -58,12 +57,6 @@ function log(message) {
|
|||||||
appointmentLogger.log({level: "info", message: message})
|
appointmentLogger.log({level: "info", message: message})
|
||||||
}
|
}
|
||||||
|
|
||||||
async function clearApp(device, packageName) {
|
|
||||||
let cmd = `adb -s ${device.serial} shell pm clear ${packageName}`
|
|
||||||
logWithDevice("cmd is " + cmd, device)
|
|
||||||
await exec(cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function exceutShellCmd(device, cmdToExecut) {
|
async function exceutShellCmd(device, cmdToExecut) {
|
||||||
let cmd = `adb -s ${device.serial} shell ${cmdToExecut}`
|
let cmd = `adb -s ${device.serial} shell ${cmdToExecut}`
|
||||||
logWithDevice("cmd is " + cmd, device)
|
logWithDevice("cmd is " + cmd, device)
|
||||||
@@ -827,11 +820,11 @@ class CommandorPage {
|
|||||||
this.isCountryChoosen = false;
|
this.isCountryChoosen = false;
|
||||||
this.isPhoneInput = false;
|
this.isPhoneInput = false;
|
||||||
this.isPasspordInput = false;
|
this.isPasspordInput = false;
|
||||||
await clearApp(this.device, this.browserPackageName)
|
await this.device.clearApp(this.browserPackageName)
|
||||||
|
// await clearApp(this.device, this.browserPackageName)
|
||||||
// await this.device.shell("pm clear " + this.browserPackageName)
|
// await this.device.shell("pm clear " + this.browserPackageName)
|
||||||
await delay(1000)
|
await delay(1000)
|
||||||
this.isTerminated = true;
|
this.isTerminated = true;
|
||||||
// await this.checkResultWithOcr();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -888,6 +881,10 @@ class CommandorPage {
|
|||||||
case OCRResult.SLIDING_CAPTCHA_REFRESH:
|
case OCRResult.SLIDING_CAPTCHA_REFRESH:
|
||||||
await this.connect_to_browser(checkResult)
|
await this.connect_to_browser(checkResult)
|
||||||
break;
|
break;
|
||||||
|
case OCRResult.CHROME_NOTIFICATION:
|
||||||
|
await this.handleChromeNotification()
|
||||||
|
await this.checkResultWithOcr();
|
||||||
|
break;
|
||||||
case OCRResult.SLIDING_CAPTCHA:
|
case OCRResult.SLIDING_CAPTCHA:
|
||||||
logWithDevice("will call this.slidingCaptcha()", this.device)
|
logWithDevice("will call this.slidingCaptcha()", this.device)
|
||||||
await this.slidingCaptcha(async (isSuccessful) => {
|
await this.slidingCaptcha(async (isSuccessful) => {
|
||||||
@@ -1354,8 +1351,8 @@ class CommandorPage {
|
|||||||
this.device.shell("input tap " + 925 + " " + 1325)
|
this.device.shell("input tap " + 925 + " " + 1325)
|
||||||
} else if (this.device.model === "22041219PG") {
|
} else if (this.device.model === "22041219PG") {
|
||||||
this.device.shell("input tap " + 925 + " " + 1430)
|
this.device.shell("input tap " + 925 + " " + 1430)
|
||||||
} else if (this.device.model === "moto g51 5G") {
|
} else if (this.device.model === "moto_g51_5G") {
|
||||||
await this.tapForDevice(this.device, 950, 1434)
|
this.device.shell("input tap " + 950 + " " + 1434)
|
||||||
} else
|
} else
|
||||||
this.device.shell("input tap " + 933 + " " + 1538)
|
this.device.shell("input tap " + 933 + " " + 1538)
|
||||||
await delay(2000);
|
await delay(2000);
|
||||||
@@ -1417,7 +1414,7 @@ class CommandorPage {
|
|||||||
this.device.shell("input tap " + 818 + " " + 2140)
|
this.device.shell("input tap " + 818 + " " + 2140)
|
||||||
await delay(1000);
|
await delay(1000);
|
||||||
} else if (model === "moto_g51_5G") {
|
} else if (model === "moto_g51_5G") {
|
||||||
await this.tapForDevice(this.device, 800, 2215)
|
this.device.shell("input tap " + 806 + " " + 2230)
|
||||||
await delay(2000);
|
await delay(2000);
|
||||||
this.device.shell("input tap " + 800 + " " + 2215)
|
this.device.shell("input tap " + 800 + " " + 2215)
|
||||||
await delay(1000);
|
await delay(1000);
|
||||||
@@ -1448,6 +1445,8 @@ class CommandorPage {
|
|||||||
this.device.shell("input tap " + 490 + " " + 1910)
|
this.device.shell("input tap " + 490 + " " + 1910)
|
||||||
} else if (model === "RMX3151") {
|
} else if (model === "RMX3151") {
|
||||||
this.device.shell("input tap " + 492 + " " + 1960)
|
this.device.shell("input tap " + 492 + " " + 1960)
|
||||||
|
} else if (model === "Pixel"||model === "Pixel_2") {
|
||||||
|
this.device.shell("input tap " + 312 + " " + 1490)
|
||||||
} 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") {
|
||||||
@@ -1465,6 +1464,8 @@ class CommandorPage {
|
|||||||
this.device.shell("input tap " + 510 + " " + 1975)
|
this.device.shell("input tap " + 510 + " " + 1975)
|
||||||
} else if (model === "MI_5s") {
|
} else if (model === "MI_5s") {
|
||||||
this.device.shell("input tap " + 510 + " " + 1615)
|
this.device.shell("input tap " + 510 + " " + 1615)
|
||||||
|
} else if (model === "Mi_Note_10") {
|
||||||
|
await this.tapForDevice(this.device, 498, 1910)
|
||||||
} else
|
} else
|
||||||
this.device.shell("input tap " + 385 + " " + 2050)
|
this.device.shell("input tap " + 385 + " " + 2050)
|
||||||
await delay(1000);
|
await delay(1000);
|
||||||
@@ -1543,6 +1544,16 @@ class CommandorPage {
|
|||||||
await this.tapForDevice(this.device, 100, 400)
|
await this.tapForDevice(this.device, 100, 400)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async handleChromeNotification() {
|
||||||
|
let model = this.device.model
|
||||||
|
if (model === "KB2003" || model === "22041219PG" || model === "DE2117" || model === "21091116C") {
|
||||||
|
await this.tapForDevice(this.device, 545, 1448)
|
||||||
|
} else if (model === "sdk_gphone64_arm64") {
|
||||||
|
await this.tapForDevice(this.device, 484, 1723)
|
||||||
|
} else
|
||||||
|
await this.tapForDevice(this.device, 100, 400)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module
|
module
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ const PAGE_OPTIMIZATION_CHROME_FR_4 = "de nouvelles fonctionnalités"
|
|||||||
const PAGE_OPTIMIZATION_CHROME_FR_5 = "Avec la mesure des performance"
|
const PAGE_OPTIMIZATION_CHROME_FR_5 = "Avec la mesure des performance"
|
||||||
const PAGE_OPTIMIZATION_CHROME_FR_7 = "Les annonces suggérées par les"
|
const PAGE_OPTIMIZATION_CHROME_FR_7 = "Les annonces suggérées par les"
|
||||||
const PAGE_OPTIMIZATION_CHROME_FR_8 = "Chrome estime vos centres"
|
const PAGE_OPTIMIZATION_CHROME_FR_8 = "Chrome estime vos centres"
|
||||||
|
const CHROME_NOTIFICATION = "Les notifications de Chrome"
|
||||||
const ONLINE_APPOINTMENT = "Online Appointment"
|
const ONLINE_APPOINTMENT = "Online Appointment"
|
||||||
const CONFIRM_RESEND_FORM_FR = "Confirmer le nouvel envoi"
|
const CONFIRM_RESEND_FORM_FR = "Confirmer le nouvel envoi"
|
||||||
const CLOSED_MESSAGE_FR = "Depuis plus de 130 ans"
|
const CLOSED_MESSAGE_FR = "Depuis plus de 130 ans"
|
||||||
@@ -109,6 +110,9 @@ class OCRChecker {
|
|||||||
} else if (result.includes(PUSH_NOTIFICATION_1)) {
|
} else if (result.includes(PUSH_NOTIFICATION_1)) {
|
||||||
await this.deleteFile(fileName)
|
await this.deleteFile(fileName)
|
||||||
return OCRResult.BRAVE_PUSH_NOTIFICATION
|
return OCRResult.BRAVE_PUSH_NOTIFICATION
|
||||||
|
} else if (result.includes(CHROME_NOTIFICATION)) {
|
||||||
|
await this.deleteFile(fileName)
|
||||||
|
return OCRResult.CHROME_NOTIFICATION
|
||||||
} else if (result.includes(CHOOSE_POSITION_GOOGLE_FR)) {
|
} else if (result.includes(CHOOSE_POSITION_GOOGLE_FR)) {
|
||||||
await this.deleteFile(fileName)
|
await this.deleteFile(fileName)
|
||||||
return OCRResult.CHOOSE_POSITION
|
return OCRResult.CHOOSE_POSITION
|
||||||
|
|||||||
Reference in New Issue
Block a user