add try catch for click()
This commit is contained in:
@@ -64,7 +64,11 @@ class GeoCaptchaSolver {
|
||||
console.log("play audio")
|
||||
let iframeHandler = await this.page.frameLocator("body > iframe");
|
||||
let playAudioBtn = await iframeHandler.locator(PLAY_AUDIO_BTN_ID);
|
||||
playAudioBtn.click();
|
||||
try {
|
||||
playAudioBtn.click();
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
await delay(4000 + getRandomWaitTime());
|
||||
let captcha_container = await iframeHandler.locator(CAPTCHA_CONTAINER)
|
||||
let html = await captcha_container.innerHTML()
|
||||
|
||||
Reference in New Issue
Block a user