Hi arajan37,
Option #1:
Assuming that the image table is going to be at the same location on the page at all the times whenever the webpage is opened. The image containing the text can be anywhere within that table but the table should be at the same place and the size of all the images should be same. That is how Region Mode requires the data to be - in the same place in that same region. We have to use Region mode since that is the one that reads a text from an image. Here's the logic you could make use of if all of the above assumptions are true.
For instance you have a table with images of 4 rows and 4 columns-
- Spy every single image in Region Mode.
- Name them as you spy them. Give the name such that it has the row and column number in the name - eg; Image1_1 meaning Image of 1st row and 1st column
- After you spy the Images in Region mode, in your diagram use a Reader stage. In the Reader stage you will get an action called as 'Read Text with OCR'. In the 'Store In' field give a Text data item (say 'TextFromImage'). When your diagram flows through this Reader stage it will store whatever text is written on that image into the Text data item.
If there is no text on that Image then nothing will be returned in that Text data item.
Now use a Decision stage to compare the Text data item (TextFromImage) with the data item where you have stored the word "home". (You can even do a hard coded comparison with the word "home")
If these two match with the text comparison then it means this is your correct image. Now you already know from the element name (Image1_1) that this is 1st row and 1st column. So store 1 in a new data item called as Row and 1 in another data item called as Column.
If this is done for all the images you will match the text on each of the images and find the right one, if it exists.
Option #2:
Another option is
if you are able to save or download the images then you can open it any of the Image Viewer on your machine and then read the text from the image using the same way (Region Mode) as above.
Also be noted that if you use AA mode on the image, the Application Modeller could return an attribute called as Value which would contain the path/url to the Image. See if you could make use of that.
Refer Post #8 in below link. This also has got the Business Object attached to the post.
http://rpaforum.net/threads/image.1132/post-3485
If you are not able to download the images of your webpage you can still open this BO and see how the Region mode is used to get the text from an image.
Post back with what you come up with.