Detect recaptcha I am not a robot

I am testing a script to auto share eCommerce listings on a Site. Sometimes I will get a popup… I am not a robot. It never ask to solve anything just click the box.

How can my script that is running detect the recaptcha modal has popped up and pause.

In other words I need it to pause and stay paused when the captcha appears. But first and foremost it needs to detect it popes up.

I am running a loop that clicks a share button…

  "Command": "click",
  "Target": "xpath=(//ul[contains(@class,'listing-actions-con')]/li[3]/a/i)[${Loop_Counter}]",
  "Value": ""

Right now it will just keep running the loop when the captcha appears.

This is code I had in another program I use to use…

function captchaChecker() {
if (('#captcha-popup').css('display') == 'block' || (’.g-recaptcha-con’).length > 0) {
captchaPoppedUp = true;
myAudio.play();
chrome.storage.local.set({‘keepSharing’: false});
var id = window.setTimeout(function() {}, 0); while (id–) { window.clearTimeout(id); }

  setTimeout(function() {
    alert('Click the reCaptcha checkbox & restart the function to continue.');
  }, 500);

}

// $(‘html’).append(‘

I AM CAPTCHA!

’);
}

Anyway this can be adapted to run here and if so how…

Also anyway to actually click the box?

Thanks in advance :slight_smile:

1 Like

Can you add a screenshot or screencast? Is the captcha popup a real popup (outside the web browser) or something on the page?

Same thing if you find a way let us know please! Thanks :cowboy_hat_face:

Now I have an idea… you can run a second macro (a desktop automation RPA macro) in a loop using a second browser or browser profile. This macro will do nothing else then looking for the the recaptcha modal and click it if it shows up.

@Be_Nice

You can click the Recaptcha checkbox and with statusOK you can verify if the clicked was successfull.

To click Recaptcha checkbox you can use this code

{
  "Name": "Activate-Captcha",
  "CreationDate": "2020-5-17",
  "Commands": [
    {
      "Command": "bringBrowserToForeground",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "selectFrame",
      "Target": "relative=top",
      "Value": ""
    },
    {
      "Command": "selectFrame",
      "Target": "index=0",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//div[@class='recaptcha-checkbox-border']",
      "Value": ""
    }
  ]
} 

After verify StatusOK to know if recaptcha is inside the page or not.