WinRunner Interview Questions And Answers

Download WinRunner Interview Questions and Answers PDF

Optimize your WinRunner interview preparation with our curated set of 67 questions. These questions are specifically selected to challenge and enhance your knowledge in WinRunner. Perfect for all proficiency levels, they are key to your interview success. Secure the free PDF to access all 67 questions and guarantee your preparation for your WinRunner interview. This guide is crucial for enhancing your readiness and self-assurance.

67 WinRunner Questions and Answers:

WinRunner Job Interview Questions Table of Contents:

WinRunner Job Interview Questions and Answers
WinRunner Job Interview Questions and Answers

1 :: How do you handle TSL exceptions?

Suppose you are running a batch test on an unstable version of your application. If your application crashes, you want WinRunner to recover test execution. A TSL exception can instruct WinRunner to recover test execution by exiting the current test, restarting the application, and continuing with the next test in the batch.
The handler function is responsible for recovering test execution. When WinRunner detects a specific error code, it calls the handler function. You implement this function to respond to the unexpected error in the way that meets your specific testing needs.
Read More

2 :: How do you handle pop-up exceptions?

A pop-up exception Handler handles the pop-up messages that come up during the execution of the script in the AUT. TO handle this type of exception we make WinRunner learn the window and also specify a handler to the exception. It could be
Default actions: WinRunner clicks the OK or Cancel button in the pop-up window, or presses Enter on the keyboard. To select a default handler, click the appropriate button in the dialog box.
User-defined handler: If you prefer, specify the name of your own handler. Click User Defined Function Name and type in a name in the User Defined Function Name box.
Read More

3 :: How do you handle unexpected events and errors?

WinRunner uses exception handling to detect an unexpected event when it occurs and act to recover the test run.
WinRunner enables you to handle the following types of exceptions:
Pop-up exceptions: Instruct WinRunner to detect and handle the appearance of a specific window.
TSL exceptions: Instruct WinRunner to detect and handle TSL functions that return a specific error code.
Object exceptions: Instruct WinRunner to detect and handle a change in a property for a specific GUI object.
Web exceptions: When the WebTest add-in is loaded, you can instruct WinRunner to handle unexpected events and errors that occur in your Web site during a test run.
Read More

4 :: What are the three modes of running the scripts?

WinRunner provides three modes in which to run tests: Verify, Debug, and Update. You use each mode during a different phase of the testing process.
Verify
Use the Verify mode to check your application.
Debug
Use the Debug mode to help you identify bugs in a test script.
Update
Use the Update mode to update the expected results of a test or to create a new expected results folder.
Read More

5 :: WITHOUT the GUI map, use the phy desc directly?

It's easy, just take the description straight
out of the GUI map squigglies and all, put it
into a variable (or pass it as a string)
and use that in place of the object name.

button_press ( "btn_OK" );
becomes
button_press ("{class: push_button, label: OK}");
Read More

6 :: How to get the resolution settings?

Use get_screen_res(x,y) to get the screen resolution in WR7.5.
or
Use get_resolution (Vert_Pix_int, Horz_Pix_int, Frequency_int) in WR7.01
Read More

7 :: How to have winrunner insert yesterdays date into a field in the application?

1) Use get-time to get the PC system time in seconds since 01/01/1970
2)Subtract 86400 (no seconds in a day) from it
3)Use time_str to convert the result into a date format
4)If format of returned date is not correct use string manipulations to get the format you require
5) Insert the date into your application
Alternatively you could try the following :
1) In an Excel datasheet create a column with an appropriate name, and in the first cell of the column use the excel formula 'today() - 1'
2) Format the cell to give you the required date format
3) Use the ddt- functions to read the date from the excel datasheet
4) insert the reteived date into your application
Read More

8 :: How can withwin runner to make single scripts which supports multiple languages?

Actually, you can have scripts that run for different locales.I have a set of scripts that run for Japanese as well as English Locales. Idea is to have objects recorded in GUI Map with a locale independent physical description. This can be achieved in two ways.
1. After recording the object in the GUI Map, inspect the description and ensure that no language specific properties are used. For ex: html_name property for an object of class: html_text_link could be based on the text. You can either remove these language dependent properties if it doesnt really affect your object recognition. If it does affect, you need to find another property for the object that is locale independent. This new property may be something thats already there or you need to create them. This leads to the next option.
2. Have developers assign a locale independent property like 'objname' or something to all objects that you use in your automated scripts. Now, modify your GUI Map description for the particular object to look for this property instead of the standard locale dependent properties recorded by WR (these default properties are in GUI Map Configuration).
Read More

9 :: How to force WR to learn the sub-items on a menu?

If WR is not learning sub-items then the easy way id to add manually those sub items in to GUI map.. of course you need to study the menu description and always add the PARENT menu name for that particular sub-menu..
Read More

10 :: How to check property of specific Icon is highlighted or not?

set_window("Name of the window");
obj_check_info("Name of the object ","focused",0ut_value);

check for out_value & proceed further
Read More

11 :: BitMap or GUI Checkpoints

DO NOT use BitMap or GUI Checkpoints for dynamic verification. These checkpoints are purely for static verifications. There are ofcourse, work-arounds, but mostly not worth the effort.
Read More
You can use the "statusbar_get_text("Status Bar",0,text);" function "text" variable contains the status bar statement.
or
web_cursor_to_link ( link, x, y );
link The name of the link.
x,y The x- and y-coordinates of the mouse pointer when moved to a link, relative to the upper left corner of the link.
Read More

13 :: Text Field Validations

Need to validate text fields against
1. Null
2. Not Null.
3. whether it allows any Special Characters.
4. whether it allows numeric contents.
5. Maximum length of the field etc.

1) From the requirements find out what the behaviour of the text field in question should be. Things you need to know are :
what should happen if field left blank
what special characters are allowed
is it an alpha, nemeric or alphanumeric field etc.etc.

2) Write manual tests for doing what you want. This will create a structure to form the basis of your WR tests.

3) now create your WR scripts. I suggest that you use data driven tests and use Excel spreadsheets for your inputs instead of having user input. For example the following structure will test whether the text field will accept special characters :
Read More

14 :: How to break infinite loop

set_window("Browser Main Window",1);
text="";
start = get_time();
while(text!="Done")
{
statusbar_get_text("Status Bar",0,text);
now = get_time();
if ( (now-start) == 60 )
# Specify no of seconds after which you want
break
{
break;
}
}
Read More

15 :: User-defined function that would write to the Print-log as well as write to a file

function writeLog(in strMessage){
file_open("C:FilePath...");
file_printf(strMessage);
printf(strMessage);
}
Read More

16 :: How to do text matching?

You could try embedding it in an if statement. If/when it fails use a tl_step statement to indicate passage and then do a texit to leave the test. Another idea would be to use win_get_text or web_frame_get_text to capture the text of the object and the do a comparison (using the match function) to determine it's existance.
Read More

17 :: the MSW_id value sometimes changes, rendering the GUI map useless

MSW_Id's will continue to change as long as your developers are modifying your application. Having dealt with this, I determined that each MSW_Id shifted by the same amount and I was able to modify the entries in the gui map rather easily and continue testing.

Instead of using the MSW_id use the "location". If you use your GUI spy it will give you every detail it can. Then add or remove what you don't want.
Read More

18 :: What is Boundary Test?

Boundary tests are designed to check a program's response to extreme input values. Extreme output values are generated by the input values. It is important to check that a program handles input values and output results correctly at the lower and upper boundaries. Keep in mind that you can create extreme boundary results from non-extreme input values. It is essential to analyze how to generate extremes of both types. In addition. sometime you know that there is an intermediate variable involved in processing. If so, it is useful to determine how to drive that one through the extremes and special conditions such as zero or overflow condition.
Read More

19 :: How do you find an object in an GUI map?

The GUI Map Editor is been provided with a Find and Show Buttons.
To find a particular object in the GUI Map file in the application, select the object and click the Show window. This blinks the selected object.
To find a particular object in a GUI Map file click the Find button, which gives the option to select the object. When the object is selected, if the object has been learned to the GUI Map file it will be focused in the GUI Map file.
Read More

20 :: What different actions are performed by find and show button?

To find a particular object in the GUI Map file in the application, select the object and click the Show window. This blinks the selected object.
To find a particular object in a GUI Map file click the Find button, which gives the option to select the object. When the object is selected, if the object has been learned to the GUI Map file it will be focused in the GUI Map file.
Read More

21 :: How do you identify which files are loaded in the GUI map?

The GUI Map Editor has a drop down GUI File displaying all the GUI Map files loaded into the memory.
Read More

22 :: How do you modify the logical name or the physical description of the objects in GUI map?

You can modify the logical name or the physical description of an object in a GUI map file using the GUI Map Editor.
Read More

23 :: When do you feel you need to modify the logical name?

Changing the logical name of an object is useful when the assigned logical name is not sufficiently descriptive or is too long.
Read More

24 :: When it is appropriate to change physical description?

Changing the physical description is necessary when the property value of an object changes.
Read More

25 :: How WinRunner handles varying window labels?

We can handle varying window labels using regular expressions. WinRunner uses two hidden properties in order to use regular expression in an object’s physical description. These properties are regexp_label and regexp_MSW_class.
i. The regexp_label property is used for windows only. It operates behind the scenes to insert a regular expression into a window’s label description.
ii. The regexp_MSW_class property inserts a regular expression into an object’s MSW_class. It is obligatory for all types of windows and for the object class object.
Read More