In most cases, WinRunner can identify the text on GUI objects automatically. However, if you try to read text and the comment “#no text was found” is inserted into the test script, this means WinRunner was unable to identify your application font.
To enable WinRunner to identify text, you must teach WinRunner your application fonts using the Fonts Expert Utility and use the image text recognition mechanism when running your tests.
To teach fonts to WinRunner, you perform the following main steps:
A font group is a collection of fonts that are bound together for specific testing purposes. Note that at any time, only one font group may be active in WinRunner. In order for a learned font to be recognized, it must belong to the active font group. However, a learned font can be assigned to multiple font groups.
Note that all learned fonts and defined font groups are stored in a font library. This library is designated by the XR_GLOB_FONT_LIB parameter in the wrun.ini file; by default, it is located in the WinRunner installation folder/fonts subfolder.
Learning a Font
If WinRunner cannot read the text in your application, use the Font Expert to learn the font.
To learn a font:
When the learning process is complete, the Existing Characters box displays all characters learned and the Properties box displays the properties of the fonts learned. WinRunner creates a file called font_name.mfn containing the learned font data and stores it in the font library.
Creating a Font Group
Once a font is learned, you must assign it to a font group. Note that the same font can be assigned to more than one font group.
To create a new font group:
WinRunner creates a file called group_name.grp containing the font group data and stores it in the font library.
To add fonts to an existing font group:
To delete a font from a font group:
Running Tests on Learned Fonts
In order to instruct WinRunner to use the fonts in your font group, you must use the Image Text Recognition mechanism instead of WinRunner’s standard text recognition mechanism and you must activate the font group that includes the fonts your application uses.
To enable WinRunner to recognize learned fonts:
Only one group can be active at any time. By default, this is the group designated by the XR_FONT_GROUP system parameter in the wrun.ini file. However, within a test script you can activate a different font group or the setvar function together with the fontgrp test option.
For example, to activate the font group named editor from within a test script, add the following statement to your script:
setvar ("fontgrp", "editor");
For more information about setting text recognition preferences from the General Options dialog box, see “Setting Global Testing Options.” For more information about using the setvar function to choose a font group from within a test script, see “Setting Testing Options from a Test Script.”
WinRunner Related Interview Questions
|SILK TEST Interview Questions||LoadRunner Interview Questions|
|WinRunner Interview Questions||HTML Interview Questions|
|QTP Interview Questions||Manual Testing Interview Questions|
|OpenStack Interview Questions||Automation Testing Interview Questions|
|API testing Interview Questions||Rational robot Interview Questions|
|Selenium IDE Interview Questions||Performance Testing Interview Questions|
|Test Director Interview Questions|
Winrunner At A Glance
Understanding How Winrunner Identifies Gui Objects
Understanding Basic Gui Map Concepts
Working In The Global Gui Map File Mode
Editing The Gui Map
Merging Gui Map Files
Configuring The Gui Map
Learning Virtual Objects
Checking Gui Objects
Working In The Gui Map File Per Test Mode
Working With Web Objects
Working With Activex And Visual Basic Controls
Checking Powerbuilder Applications
Checking Table Contents
Creating Data-driven Tests
Synchronizing The Test Run
Defining And Using Recovery Scenarios
Handling Web Exceptions
Using Regular Expressions
Enhancing Your Test Scripts With Programming
Creating User-defined Functions
Creating Compiled Modules
Calling Functions From External Libraries
Creating Dialog Boxes For Interactive Input
Understanding Test Runs
Analyzing Test Results
Running Batch Tests
Running Tests From The Command Line
Controlling Your Test Run
Setting Properties For A Single Test
Setting Global Testing Options
Customizing The Test Script Editor
Customizing The Winrunner User Interface
Setting Testing Options From A Test Script
Customizing The Function Generator
Initializing Special Configurations
Integrating With Quicktest Professional
Managing The Testing Process
Testing Systems Under Load
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.