← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #273706]: Couldn't able to extract exact text from image

 

Question #273706 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/273706

Description changed to:
Hi ,

I'm using sikuli for one of the App testing and it is working fine. I
have seen the below  issues while extracting text from the images.

Issue1:

Image has text "Quantity value is invalid", when im grepping with below code it is returning the "Quantityvalue is invalid"(Failed to return the exact text, space issue seen between Quantity and value)
 
textSearch = find("sikuli.png").highlight(1)
    textFound = textSearch.text()
    print "Grepped text is",textFound

O/P---->
Grepped text is Quantityvalue is invalid.

Issue2:
Image has a text "site_1",when im grepping the text using the above code(with different image) but it is not returning anything.

textSearch = find("sites.png").highlight(1)
    textFound = textSearch.text()
    print "Grepped text is",textFound

O/P---->
Grepped text is

 for workaround used the below code and it is working fine.
find(Pattern("sites.png").exact()).below(10).text()

Issue3:
In a screen i have 2 similar images with name site_1 and site_2(only name difference between those images and rest is similar ) and wants to extract text "site_1" and "site_2" from the images but with above code(find(Pattern("sites.png").exact()).below(10).text()) i can able to extract  text "site_1" only (as it placed before  site_2 on screen) , may i know how can i extract site_2 from image2.

Im using sikuli 1.1.0(with options 1 and 3) and windows machine.

Thanks in Advance

regards
Siddu

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.