How to automate Image Captcha


Question asked in Sapient:

I am working Automation in Selenium, I have to automate on registration Page and this Page contains a Google Image captcha which is a mandatory field , Can you please let me know how to skip the field to complete my script to automate or any other possible way to achieve it.

xLov3rDns Professor Asked on December 1, 2014 in Selenium WebDriver.
Add Comment
3 Answer(s)
Best answer

The purpose of captcha is to prevent automated attacks.

1.       The best way to deal with captcha is to disable captcha in test environment. Run your automated test and enable again. If this is not feasible, read further.
2.       However, Captchas can be automated if we are able to decode the image using OCR(Optical character recognition tools). This would still require expert level image pattern mapping and writing a complex algorithm to sort out the image pattern.
3.       Another solution for automated testing of captcha is to make a back door entry. This would need an application code change (however, only dev team can tell if it is at all feasible for Google CAPTCHA).

Make the captcha so it will always accept two inputs. The first is the randomly generated string we present to the user and the other is a secret back door value. So if you input the secret backdoor key it is always accepted. If you hard code the key there is a the danger it will get out to the public.  If the developers can make the secret key a configurable value, one just needs to edit the configuration file to change the key.

Also note that ideally any captcha back door is only enabled in a test environment, and there should be a test that is run in production after each install to verify that it is disabled there.

xLov3rDns Professor Answered on December 1, 2014.
Add Comment

Yes I have also tried hard to automate image captcha tried lot using Aspire OCR dll file

But I reached to conclusion that may be paid version of this DLL can work on automating captha

RE: How to automate Image Captcha
RE: How to automate Image Captcha
RE: How to automate Image Captcha
RE: How to automate Image Captcha

amitjain Supporter Answered on March 11, 2015.
Add Comment

Text From Image After Aspire OCR read it:



nklINC rO CR – B60

dloCR 80YB – 70D

IRIS 8 ClR BO lB – 8 OO



rklBRkl 7HlJK YOU Ml’ll – l1s

llmna J!!Ice. Pine,:%Ir JIiice. Yin;mJi icp, ( renm

vJRoTn’coL u  – l s

VineapµIp J!iicp, Ci! am. r,; rIJiI!:; l r ;;!ni

OU?Vl MlRY – l76

(:unva Ju;ee. ‘f:Il;asro. Worcei ;enl;;rL  hnIIcc. Sall. l’ep!;8r, l.;n;r JiI;n


Blu;!b! r?. li;nr W g Lt. S;;ri!r. Sn!la, Mi;!I. S;;yar

VI R0I N l 0J Il0 – l15

li;!;I  Wt%g   . M!!iI. Su8,;r. Soda, S! ri;L

SlrC SEK OJ T8E B6?CB – I75

On;iy8 J;;icy. l nnbrr? Ju;n. YI;.:! t: S! r: !!. l,i;i;r

rOIr C8lPllJ – I1s

(|uc;!mh; r. Or, ngI  ( l.!;nk . It !nn!I, tpnIe .

hn8m;;!rn BI!ipn. llrnnh? l jrd:il



l 0l8 8 I SPRI JO %lTER – I 00

CneR0Y DRIlKS – l16

BOYrlCD WkTER – 75

lONIC %lrER – lOO



rRCSY LIlC%lrE?l50Dl – 16

PlC llO E D CRUIY ? UI C E5 – 7 6

COYYEElrel – 7B

?EBllCo BEyERlOlS – 15


Length of total text : 977

amitjain Supporter Answered on March 11, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.