fix sliding captcha issue
This commit is contained in:
@@ -730,7 +730,6 @@ class CommandorPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async slidingCaptcha(onResult) {
|
async slidingCaptcha(onResult) {
|
||||||
logWithDevice("slidingCaptcha", this.device);
|
logWithDevice("slidingCaptcha", this.device);
|
||||||
if (this.device.model() === "MI 5s" || this.device.model() === "ASUS_X00QD" || this.device.model() === "ASUS_Z012D" || this.device.model() === "HUAWEI NXT-TL00") {
|
if (this.device.model() === "MI 5s" || this.device.model() === "ASUS_X00QD" || this.device.model() === "ASUS_Z012D" || this.device.model() === "HUAWEI NXT-TL00") {
|
||||||
@@ -875,6 +874,7 @@ class CommandorPage {
|
|||||||
logWithDevice("will recheck OCR", this.device)
|
logWithDevice("will recheck OCR", this.device)
|
||||||
checkResult = await this.ocrChecker.get_result();
|
checkResult = await this.ocrChecker.get_result();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (checkResult === OCRResult.SLIDING_CAPTCHA) {
|
while (checkResult === 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) => {
|
||||||
@@ -882,8 +882,8 @@ class CommandorPage {
|
|||||||
console.log(checkResult);
|
console.log(checkResult);
|
||||||
if (isSuccessful) {
|
if (isSuccessful) {
|
||||||
await delay(5 * 1000)
|
await delay(5 * 1000)
|
||||||
// checkResult = await this.ocrChecker.get_result();
|
checkResult = await this.ocrChecker.get_result();
|
||||||
await this.checkResultWithOcr()
|
// await this.checkResultWithOcr()
|
||||||
} else {
|
} else {
|
||||||
if (checkResult === OCRResult.SLIDING_CAPTCHA) {
|
if (checkResult === OCRResult.SLIDING_CAPTCHA) {
|
||||||
checkResult = OCRResult.TERMINAED
|
checkResult = OCRResult.TERMINAED
|
||||||
@@ -1025,9 +1025,11 @@ class CommandorPage {
|
|||||||
await this.tapForDevice(this.device, 360, 820)
|
await this.tapForDevice(this.device, 360, 820)
|
||||||
} else if (this.device.model() === "M2006C3LG" || this.device.model() === "220233L2G") {
|
} else if (this.device.model() === "M2006C3LG" || this.device.model() === "220233L2G") {
|
||||||
await this.tapForDevice(this.device, 350, 777)
|
await this.tapForDevice(this.device, 350, 777)
|
||||||
} else if (this.device.model() === "KB2003" || this.device.model() === "DE2117") {
|
} else if (this.device.model() === "KB2003") {
|
||||||
await this.tapForDevice(this.device, 500, 1200)
|
await this.tapForDevice(this.device, 500, 1200)
|
||||||
await this.tapForDevice(this.device, 500, 1120)
|
await this.tapForDevice(this.device, 500, 1120)
|
||||||
|
} else if (this.device.model() === "DE2117") {
|
||||||
|
await this.tapForDevice(this.device, 545, 1130)
|
||||||
} else
|
} else
|
||||||
try {
|
try {
|
||||||
await this.tapForDevice(this.device, 500, 1120)
|
await this.tapForDevice(this.device, 500, 1120)
|
||||||
|
|||||||
Reference in New Issue
Block a user