add try catch for click()
This commit is contained in:
@@ -64,7 +64,11 @@ class GeoCaptchaSolver {
|
|||||||
console.log("play audio")
|
console.log("play audio")
|
||||||
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();
|
try {
|
||||||
|
playAudioBtn.click();
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
await delay(4000 + 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()
|
||||||
|
|||||||
Reference in New Issue
Block a user