Sikuli- How To Fetch/Extract Text From An Image || How To Get Text From Captcha Image

SIKULI- HOW TO FETCH/EXTRACT/GET TEXT FROM A TEXT CAPTCHA IMAGE

If you are Automating an Application which has a submit FORM with TEXT CAPTCHA IMAGE, it is really tough to deal with it with tools like SELENIUM or any other software testing tools. SIKULI which is an IMAGE based tool , helps a lot to deal with this kind of situation.Lets see the below form taken from a recruitment website:

sikuli to capture text from an image

Here is the small code to get text of CAPTCHA IMAGE in a variable :

SIKULI Code To CAPTURE TEXT FROM AN IMAGE

Here is the output received from Sikuli script:

Text out put of an image by sikuli script

Text out put of an image by sikuli script

The same output can be populated to the CAPTCHA edit box to complete the test.

In order to get Image Text feature enabled in the Sikuli, user has to navigate to File>>Preferences>>more options>>check both option i.e. “allow searching for text” and “allow OCR” ON

you can copy the code mentioned below.please replace “test.png” with your captcha image screen shot in the below mentioned code:

a=find(test.png).text()
print a

9 Comments

  1. dept of edu May 16, 2017
  2. gold price May 16, 2017
  3. online school tips May 17, 2017
  4. legal advice employment May 18, 2017
  5. financial advisor best May 18, 2017
  6. career guidance May 19, 2017
  7. business ideas May 19, 2017
  8. importance of education May 20, 2017
  9. RIsh May 8, 2018

Leave a Reply

error: Content is protected !!