Incorrect element(or image) is clicked with tess4j, selenium and sikuli

Asked by srdat

selenium 3.141 in Java
sikulixapi 2.0.0 jar
tess4j-4.4.1 jar

Step1: get a screenshot of element from selenium, store it as png
Output: image is captured good

Step2: read text from captured png using bufferedimage and textrecognizer class
Output: Texts are read correctly from captured image

Step3: perform action on text using sikuli. consider two texts with same characters 'Password' and 'password' (notice p here)
Expected: perform action on 'Password'
Actual: performs action on 'password' (incorrect element clicked)

//sikuli instantiated as below
 Region s = new Screen(0);
 Settings.MinSimilarity = 0.9;

String text = callScanImageocr(); //method to read text from a png file as mentioned in step 2 and it returns 'Password' correctly.

Please suggest and correct me if anything is wrong.

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
srdat (srdat) said :

additional info: both texts are in same region.

Can you help with this problem?

Provide an answer of your own, or ask srdat for more information if necessary.

To post a message you must log in.