# How to automate Recaptcha in robot framwork

**URL:** <https://forum.robotframework.org/t/how-to-automate-recaptcha-in-robot-framwork/5294>\
**Category:** Robot Framework\
**Created:** [10 February 2023 06:49 UTC](https://forum.robotframework.org/t/how-to-automate-recaptcha-in-robot-framwork/5294 "2023-02-10T06:49:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishwa](https://avatars.discourse-cdn.com/v4/letter/v/ec9cab/32.png) [@Vishwa](https://forum.robotframework.org/u/Vishwa)\
**Post date:** [10 February 2023 06:49 UTC](https://forum.robotframework.org/t/how-to-automate-recaptcha-in-robot-framwork/5294/1 "2023-02-10T06:49:15Z")

</div>

Hello ,  
I’m trying to automate recaptca using robotframework. I have write code for same  
Open Browser ${url} ${browser}  
Maximize Browser Window  
Sleep 5s  
Input Text ${sign\_in\_email\_xpath} ${email\_id}  
Input Password ${sign\_in\_password\_xpath} ${password}  
Wait Until Page Contains Element id=“rc-anchor-container” 30s  
Wait Until Page Contains Element //span[@id=‘recaptcha-anchor’] 30s  
Click Element //span[@id=‘recaptcha-anchor’]  
Sleep 5s  
Click Button ${log\_in\_button\_xpath}  
 ![recaptcha](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/7/71822284a8adbd6fc76356df81fc15a64cdd194b.png)

---

<div class="post-metadata">

**Author:** ![Vishwa](https://avatars.discourse-cdn.com/v4/letter/v/ec9cab/32.png) [@Vishwa](https://forum.robotframework.org/u/Vishwa)\
**Post date:** [10 February 2023 09:17 UTC](https://forum.robotframework.org/t/how-to-automate-recaptcha-in-robot-framwork/5294/2 "2023-02-10T09:17:58Z")

</div>

above code is not working for me , script get fails anyone please let me know?

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [10 February 2023 10:07 UTC](https://forum.robotframework.org/t/how-to-automate-recaptcha-in-robot-framwork/5294/3 "2023-02-10T10:07:32Z")

</div>

That is the paradigm:

How can Robot Framework, prove it is not a Robot?

In other words:  
Why would you automate something who’s goal is to impede automation?

These are my “alternatives”:

- Don’t test those systems 😉
- Ask developers if they can add some attribute or alternate page to avoid CAPTCHAs (test env pages could not have them)
- Have a manual step to wait for Human to do the Login procedure

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [10 February 2023 10:28 UTC](https://forum.robotframework.org/t/how-to-automate-recaptcha-in-robot-framwork/5294/4 "2023-02-10T10:28:22Z")

</div>

Hi Vishwa,

Even if you managed to automate the recaptca, the company behind it spends a lot of resources on ensuring that it can’t automated, so expect it to change again so that your working automation will start failing.

My alternatives list is the same as Helio’s above, I’ll just add that [DialogsLibrary](https://robotframework.org/robotframework/2.1.2/libraries/Dialogs.html) is handy if you choose the 3rd alternative.

Dave.

---

<div class="post-metadata">

**Author:** ![harishpremkumar](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/harishpremkumar/32/3478_2.png) [@harishpremkumar](https://forum.robotframework.org/u/harishpremkumar)\
**Post date:** [14 February 2024 14:56 UTC](https://forum.robotframework.org/t/how-to-automate-recaptcha-in-robot-framwork/5294/5 "2024-02-14T14:56:44Z")

</div>

It is working our local system but how can I run Jenkins ?

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [14 February 2024 15:26 UTC](https://forum.robotframework.org/t/how-to-automate-recaptcha-in-robot-framwork/5294/6 "2024-02-14T15:26:23Z")

</div>

Hi @harishpremkumar,

I’m guessing from your question you choose the 3rd alternative? If so this option is not compatible with Jenkins or any CI/CD system.

Refer back to the other alternatives, if the 2nd is not possible then you’re left with the 1st.

Or there is a 4th, Have the test Fail with an error like “CAPTCHA blocks test automation”, then raise a defect on the failing test cases, with several defects you can then raise a risk on the project and risk mitigation becomes the Project Manager’s problem.

```python
Fail CAPTCHA blocks test automation

```

But I’m not telling anything new here, the question was already answered.

Dave.
