Can we automate CAPTCHA/ReCAPTCHA?

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 http://www.deathbycaptcha.com 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

References:
- Stackoverflow - https://sqa.stackexchange.com
- Wiki Pages

Cheers!
Naveen AutomationLabs

7 comments:

  1. Thanks for posting such a great article.you done a great job selenium Online Training Hyderabad

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Hi, Naveen thank you so much for your knowledge sharing. Frankly speaking you helped me a lot in my career. I have one question, that I have faced recently . In my project M working with IE11(Microsoft Edge) browser, I have opened 4 tabs by using ctrl+t, and now tried to open url in 4th tab which is opened last but the browser is opening that url in the 1st tab(default). Can u pls help me in this issue

    ReplyDelete

Featured Post

How to control Chromedriver using curl

How to control Chromedriver using curl Here is how to use Chromedriver without libraries like  selenium-webdriver . This can be useful ...