Can we automate CAPTCHA/ReCAPTCHA?

Very straight forward answer is NO.

You don’t, that is the whole idea behind a good CAPTCHA.
CAPTCHA stands for:
Completely Automated Public Turing test to tell Computers and Humans Apart
So, by definition, resolving a CAPTCHA cannot be automated: Otherwise it could not tell computers and humans apart and hence fails being a CAPTCHA.
How to handle a CAPTCHA in a test environment:
  1. If you need to test an application which uses CAPTCHA, then you need to get the development team to build in a workaround/backdoor which is only active in the test environment.
  2. Use a service like which has an API to return the text of the CAPTCHA for you. Average response is 15 seconds with a result rate of 90% or so they say. Sounds like something to try.
How to deal with CAPTCHA?
  1. Either ask dev team for a workaround, like configure CAPTCHA in test environment in such a way it will always accept 1 specific value.
  2. Ask developer to disable the CAPTCHA module in testing environment.
  3. If your are using custom CAPTCHA module, you can ask developer to generate an API of CAPTCHA generation for testing environment.
  4. You can ask dev team to add CAPTCHA code as title in markup, then you can access this title and bypass the CAPTCHA, but only in the testing environment.
Most of the time we go with option 1 or 2.
NOTE: When you do work around for CAPTCHA in test environment, You should always have this point in your checklist to make sure workarounds for CAPTCHA testing are removed before it goes on production.
To summarise the above:
  1. you shouldn’t that’s the point of captcha.
  2. implement strong AI to mimic human capabilities 
  3. implement a test harness to bypass captcha in your test automation suite

– Stackoverflow –
– Wiki Pages

Naveen AutomationLabs