use same SlidingCaptchaSolver instance
This commit is contained in:
@@ -88,6 +88,7 @@ class CommandorPage {
|
||||
this.shareCookiesWithRequests = shareCookiesWithRequests;
|
||||
this.port = port;
|
||||
this.sender = sender;
|
||||
this.slidingCaptchaSolver = new SlidingCaptchaSolver(this.device);
|
||||
this.ocrChecker = new OCRChecker(this.device, this.contact);
|
||||
// this.browserPackageName = "com.brave.browser";
|
||||
this.browserPackageName = "com.android.chrome";
|
||||
@@ -730,7 +731,6 @@ class CommandorPage {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async slidingCaptcha(onResult) {
|
||||
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") {
|
||||
@@ -738,9 +738,8 @@ class CommandorPage {
|
||||
await exec(cmd);
|
||||
await delay(5000);
|
||||
}
|
||||
let slidingCaptchaSolver = new SlidingCaptchaSolver(this.device);
|
||||
await slidingCaptchaSolver.solve(this.page, async (isSuccessful) => {
|
||||
console.log("check isAlwaysBlocked")
|
||||
await this.slidingCaptchaSolver.solve(this.page, async (isSuccessful) => {
|
||||
logWithDevice("check isAlwaysBlocked",this.device)
|
||||
this.isFillingFields = false
|
||||
onResult(isSuccessful)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user