How to validate whether specific text exists in an image

Class library usage, coding and language questions.
bmawasha
Posts: 3
Joined: Tue Feb 14, 2012 2:43 pm

How to validate whether specific text exists in an image

Post by bmawasha » Tue Feb 14, 2012 2:53 pm

I would like to know how you can validate whether specific text exists in an image. I don't only want to validate that the image exists.

The application under test is a "green screen" application, so my automation is strictly based on keyboard inputs and a single changing screen.

I have been using Sikuli and Eclipse and I want to make the switch to a .NET type tool as I'm more comfortable working with C#

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to validate whether specific text exists in an image

Post by Support Team » Tue Feb 14, 2012 3:10 pm

Hi,
I would like to know how you can validate whether specific text exists in an image.
You can use the image based validation for such purposes, for additional information please take a look at the following User Guide lesson.
Is it really an image or just the background/picture of a form, can you identify the text field with Ranorex Spy, or can you send us a Ranorex Snapshot file of your application?
Following link will show you how to generate a snapshot file:
http://www.ranorex.com/support/user-gui ... files.html

Regards,
Markus
Ranorex Support Team
.
Image

bmawasha
Posts: 3
Joined: Tue Feb 14, 2012 2:43 pm

Re: How to validate whether specific text exists in an image

Post by bmawasha » Wed Feb 15, 2012 7:39 am

Hi,

I've attached a sample screenshot of the system under test.

A brief description of the test:

1. Check the list
2. Add an account to the list
3. Regenerate the list
4. Check that the account has been added to the list

I cannot use Ranorex Spy in this instance because it only recognises the screen as an image. It is not the background of a form. The application makes use of a terminal interface, hence the need for text extraction from the image.

*For security purposes, I had to hide part of the account numbers and personal details
Attachments
image.png
A screenshot of the system under test
image.png (27.75 KiB) Viewed 3232 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to validate whether specific text exists in an image

Post by Support Team » Wed Feb 15, 2012 3:07 pm

Hi,
bmawasha wrote:I cannot use Ranorex Spy in this instance because it only recognises the screen as an image. It is not the background of a form. The application makes use of a terminal interface, hence the need for text extraction from the image
To get the text of your list you could try the following
http://www.ranorex.com/support/user-gui ... tions.html

Another possible solution would be to use the image based automation
http://www.ranorex.com/support/user-gui ... ation.html

Would it be possible to send us a Ranorex Snapshot for further analyzes to [email protected]?
How to create a Ranorex Snapshot

Regards,
Peter
Ranorex Team
.
Image

bmawasha
Posts: 3
Joined: Tue Feb 14, 2012 2:43 pm

Re: How to validate whether specific text exists in an image

Post by bmawasha » Thu Feb 16, 2012 9:22 am

Hi,

I tried the first option and I was able to identify the different lines of text. The problem, however, arises after I add the element that contains the text to the repository. The problem being that the text is forever changing. Is the a way to update the element by making use of user code to ensure that the element in the repository always contains the most recent version of the element.

Building on that, I would also then like to add all the Rawtext child elements that are created after adding the class name to the GDI Capture list to datatable that I can manipulate.

Thank you

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to validate whether specific text exists in an image

Post by Support Team » Thu Feb 16, 2012 1:40 pm

Hi,

You could use a variable in your repository item. Therefore please take a look to following link
http://www.ranorex.com/support/user-gui ... html#c2970

Regards,
Peter
Ranorex Team
.
Image