I have the following working routine on a page

1. Click an "activate" button

2. Do some activity on a page

3. Finish activity

4. Loop back to step 1 above


Sometimes the google recaptcha randomly appear at the first step after I click the "activate" button. Is there any way to check if recaptcha appear on a page so that I can insert a 2captcha action. Somethink like a "if" check

If "recaptcha appear"

Do 2aptcha

Else

Continue step 2