mergeMerge branch 'feature/reset_browser'
This commit is contained in:
@@ -62,7 +62,7 @@ class GeoCaptchaSolver {
|
|||||||
let iframeHandler = await this.page.frameLocator("body > iframe");
|
let iframeHandler = await this.page.frameLocator("body > iframe");
|
||||||
let playAudioBtn = await iframeHandler.locator(PLAY_AUDIO_BTN_ID);
|
let playAudioBtn = await iframeHandler.locator(PLAY_AUDIO_BTN_ID);
|
||||||
playAudioBtn.click();
|
playAudioBtn.click();
|
||||||
await delay(5000 + getRandomWaitTime());
|
await delay(4000 + getRandomWaitTime());
|
||||||
let captcha_container = await iframeHandler.locator(CAPTCHA_CONTAINER)
|
let captcha_container = await iframeHandler.locator(CAPTCHA_CONTAINER)
|
||||||
let html = await captcha_container.innerHTML()
|
let html = await captcha_container.innerHTML()
|
||||||
console.log("audio_tag: " + html);
|
console.log("audio_tag: " + html);
|
||||||
@@ -75,8 +75,10 @@ class GeoCaptchaSolver {
|
|||||||
await iframeHandler.locator(selector).focus()
|
await iframeHandler.locator(selector).focus()
|
||||||
await iframeHandler.locator(selector).fill("" + number_list[i - 1])
|
await iframeHandler.locator(selector).fill("" + number_list[i - 1])
|
||||||
// fieldInputs[i].value = number_list[i];
|
// fieldInputs[i].value = number_list[i];
|
||||||
await delay(800 + getRandomWaitTime());
|
await delay(500 + getRandomWaitTime());
|
||||||
}
|
}
|
||||||
|
let content = await captcha_container.innerHTML()
|
||||||
|
console.log("inner container is " + content)
|
||||||
try {
|
try {
|
||||||
if (number_list.length === 0) {
|
if (number_list.length === 0) {
|
||||||
onResult(false)
|
onResult(false)
|
||||||
@@ -123,7 +125,6 @@ class GeoCaptchaSolver {
|
|||||||
await delay(1000)
|
await delay(1000)
|
||||||
await this.device.shell("pm am start -n com.android.chrome/com.google.android.apps.chrome.Main")
|
await this.device.shell("pm am start -n com.android.chrome/com.google.android.apps.chrome.Main")
|
||||||
await delay(1000)
|
await delay(1000)
|
||||||
this.isTerminated = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user