It Possible to take screen shot and than read the text present in that image and compere that text

Is it Possible to take a screenshot and then read the text present in that image and compare that text?

yes, try to look on SIKULI
https://www.guru99.com/sikuli-tutorial.html
http://doc.sikuli.org/region.html#Region.text

hello,

yes, i have done java libs for that, but need to wait to get katalon works again, license issue :slight_smile:

ok,
found my keywords from github

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import internal.GlobalVariable

public class readImage {

@Keyword
public String readImageText(String imPath){

	String imagePath = imPath;
	com.image.txt.GetImageText image = new com.image.txt.GetImageText();
	String res = image.getImageText(imagePath);
	//image.getText(imagePath);
	return res;
}

@Keyword
public BufferedImage resized(BufferedImage bufImage,int x, int y){
	com.image.txt.GetImageText image = new com.image.txt.GetImageText();
	BufferedImage resized = image.scaleImage(bufImage, x, y);
	return resized;
}

@Keyword
public BufferedImage convert(BufferedImage bufImage){
	com.image.txt.GetImageText image = new com.image.txt.GetImageText();
	BufferedImage convert = image.convertImage(bufImage)
	return convert;
}

}

Hi @Timo_Kuisma1

I am getting the below error. What java libs have you used? Thanks …

image

Hi,

these libs are needed to import, download .jar from the web and add to the project Drivers folder, restart Katalon Studio

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;

@Timo_Kuisma1

Thanks for your prompt reply.

These libs are available in Katalon by default. image

Please tell, what is this? – com.image.txt.GetImageText

hi,

sorry my typo, this is needed also
import com.image.txt.GetImageText

this .jar is needed to add project Drivers folder

Hi @Timo_Kuisma1 Could you please share this Jar file, or the download link. I couldn’t get this JAR file in google… :face_with_head_bandage:

hi,

here

imageTxt.7z (3.6 MB)

Thanks Timo… Is there any dependency jar files required. Since my script is failing. Getting the below error. I have added the libtesseract304 but still failing.

java.lang.UnsatisfiedLinkError: Unable to load library 'libtesseract304':

hi,

yeah there are lot of more libs, but cannot paste here more than 4KB size attachment

check the size from my image 76 156 kt