← Back to team overview

sikuli-driver team mailing list archive

[Question #683606]: Need help for find()

 

New question #683606 on Sikuli:
https://answers.launchpad.net/sikuli/+question/683606

Hi Team,
Thanks for wonderful support.

Would like to find region and would like to get text for found region.
This worked well if we have region visible on screen. sample code below
new_reg = find(sample1.png)
new_reg.highlight(1)## highlighting for debugging purpose
uprint(new_reg.text())## text fetched in region

But same find funtion is not useful; if the region is not visible on screen.
Refering Q&A found 'foundAny' can be used. Hence tried below code.
But unfortunately getting error "AttributeError: 'java.util.ArrayList' object has no attribute 'text'"
new_reg = findAny('sample1.png','sample2.png') 
new_reg.highlight(1)## unable to highlight
uprint(new_reg.text())## not getting text and also throws error 

Please help me in rectifying the code and is there another way to find region out of multiple images.

Regards,
Nitin Chaudhari










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