Face it — occasionally there is an object (or group of objects) that causes fits to automation.
We need to select an item based on its text content and the text is embedded in an image – or we are faced with a large tree containing thousands of items that change regularly. Typically, these situations are barriers to automation. But OCR can be the solution to this problem.
OCR is Optical Character Recognition. Using this technology, the computer can “read” what is on the screen. It performs this task by looking at the image and matching what it sees against a database of known options.
With SmarteScript you build the database of OCR options on install. This may take a few extra moments during installation but will improve your accuracy in recognizing characters later – when you really need flexibility and speed.
Using Unique Fonts
If your application uses a font that is not installed locally we would recommend installing the font and re-building the database. This is performed in SmarteScript by selecting tools>options>utilities settings. Once you are there click on the OCR Database Setup option. Again, this may take a little extra set-up time but is well worth the effort.
Optimizing The OCR Engine
Occasionally the OCR engine needs to be “tweaked.” This is accomplished by manually editing the textract.ini file located in the directory c:/program files/smartesoft/smartescript/bin. Within this file you will find several options. I will describe the areas for adjustment here.
[Recognition]
Include1=* (this allows you to name specific fonts to be included in the database build, * allows all installed fonts to be built into database to the maximum number defined in this file)
Include2= (additional position for inclusion of font names, can be left blank with no ill effect)
Exclude= (specific fonts to exclute, i.e. dingbats)
Italic=0 (0 will exclude italic characters from the database, 1 will include italic characters)
Bold=0 (0 will exclude bold versions of fonts from inclusion in the database, 1 will include the bold versions of fonts)
Underlined=0 (0 will exclude underlined versions of fonts, 1 will include)
Sizes=8-12 (defines the size range, can be maxed to 6-72)
Multicolor=0 (setting this to 1 will improve the performance of OCR in multicolor environments, but it will be slightly slower)
Multifont=0 (allows for the recognition of character strings that switch font)
Line align=10
MaxNFonts=256 (setting for the maximum number of fonts, increases database build time, i.e. 4000)
Database Preload=0(if set to 1 the entire database loads into memory, using resources but improving performance)
Flip=1 (allows the recognition of upside down characters when set to 1)
MaxDepth=1 (how many colors allowed in font, 1=b/w)
Flexibility of OCR
Selecting appropriate choices for each modifiable OCR option will increase your productivity. It’s well worth the few minutes needed to customize selections to mirror your application’s characteristics. You’ll be glad you did.
Art Trevethan, Director of Strategy Development
Practical Tips for Regression Testing
Friday, March 18th, 2011No matter how much care you put into developing the best test scripts possible, change is going to occur during the development of software which will require test script adjustments. How do you keep up with agile development and other continuous integration build methods? I’ve got several ideas that will help you prepare for this challenge. Learn more from this whitepaper.
Art Trevethan, Director of Strategy Development
Tags: Art Trevethan, Automated Software Testing, SmarteSoft, Software Development, Software Testing Applications, SQA, test automation
Posted in General Announcements, General Comment, Tips and Tricks | No Comments »