WINRUNNER Multiple choice Questions :-

1. Based on the following code, please answer the next 2 questions:
Line 1: table = “default.xls”;
Line 2: rc = ddt_open(table, DDT_MODE_READWRITE);
What are the possible success values for ‘rc’ on line 2? Choose the best answer.
a. E_OK or E_FILE_OPEN or E_FILE_OK
b. E_FILE_OPEN or E_FILE_OK
c. 0 or E_FILE_OK
d. E_OK or E_FILE_OPEN or 0
e. E_FILE_OK or E_FILE_OPEN or 0
Ans: d

2. What is the major difference between a while loop versus a do/while loop?
a. A do/while loop will execute at least once since the evaluation is at the end of the loop. A
while loop will evaluate at the beginning and may never get executed.
b. There is no major difference. They are both used interchangeably.
c. A do/while loop takes longer to execute since the evaluation is at the end of the loop.
d. A while loop uses more WinRunner memory because the evaluation is at the beginning of the
loop.
e. A while loop is unable to call functions.
Ans: a

3. You have just replayed a test that was recorded in context sensitive mode and it failed. What are some possible reasons for this failure? Choose Three.
a. The correct GUI map is open but not loaded.
b. Your application is not open to the correct window/screen.
c. The object’s location has changed within the window.
d. You did not run the script in verify mode to save the results to a permanent location.
e. The logical name in the script does not match the logical name in the GUI map.
Ans: a,b,e

4. What statement is needed to map a custom class object to a standard Windows class object?
a. map_class(“MSMaskWndClass”, “class attached_text”, “MSW_id”, “location”);
b. set_class_map (MSMaskWndClass, “class attached_text”, “MSW_id”, “location”);
c. map_class(MSMaskWndClass, edit);
d. set_class_map(“MSMaskWndClass”, “edit”);
e. map_class(“MSMaskWndClass”, “edit”);
Ans: d

5. You want to synchronize on the Status Bar with the text “Insert Done… “. Which TSL statement would meet this requirement?
A. wait(10);
B. obj_check_gui(“Insert Done…”, “list1.ckl”, “gui1”, 16);
C. obj_wait_info(“Insert Done…”,”label”,”Insert Done…”,10);
D. obj_check_info(“Insert Done…”,”label”,”Insert Done…”,10);
Ans: C

6. How do you specify a 15-second timeout in the global timeout settings?
A. 15
B. 150
C. 1500
D. 15000
Ans: D

7. Which method should you use to synchronize the application after logging in?
A. wait for a bitmap to refresh
B. wait for a window to appear
C. wait for an object state change
D. wait for a process screen to complete
Ans: B

8. Which synchronization statement is automatically generated during recording?
A. win_activate(“Flight Reservation”);
B. set_window (“Flight Reservation 10”);
C. obj_wait_bitmap(“Flights”,”Img2″,6,7,8,101,114);
D. obj_wait_info(“Insert Done…”,”label”,”Insert Done…”,10);
Ans: B

9. The process for building a functional WinRunner script goes through four steps. What are thesesteps? (Select four.)
A. plan the test
B. synchronize
C. record steps
D. parameterize
E. add verification
F. analyze results
G. execute the test
Ans: B, C, E, G

10. A test script contains both Context Sensitive and Analog recording. The script keeps failing on the window where the Analog recording is played back. Which function can you include in your script toensure that windows and objects are in the same locations as when the test was recorded?
A. win_move function
B. GUI_load function
C. invoke_app function
D. set_window function
Ans: A

11. The toolbar enables you to view the details of an individual action or the entire test flow is
a. Testing toolbar
b. None of the above
c. Action toolbar
d. Test Pane
Ans: c

12. The key that is used to Start/End analog recording mode ?
a. F3
b. SHIFT+ALT+F3
c. CTRL+SHIFT+F3
d. F10
Ans: b

13. QuickTest supports virtual object for analog or low-level recording.
a. False
b. True
Ans: a

14. To use a specific property to identify your object, but that property is not listed in the properties list. Then how do you identify that object?
a. Add the specific property to the list
b. Use the Default property
c. Use some other property to identify your object
Ans: a

15. The checkpoint used to check the alt attribute exists for all relevant objects (such as images) is
a. DataBase CheckPoint
b. Accessibility checkpoint
c. Bitmap checkpoint
d. Standard checkpoint
Ans: b

16. Bitmap checkpoint is supported in VB environment.
a. True
b. False
Ans: a

17. Can we parameterize the checkpoints properties?
a. No
b. Yes
Ans: b

18. What is the shortcut key that is used for a Standard Checkpoint ?
a. F12
b. F2
c. F10
d. F7
Ans: a

19. Can we change name of checkpoint ?
a. No
b. Yes
Ans: a

20. To compares the values of the specified property during a run session with the values stored for the same test object property within the test.
a. Checkpoint
b. All the above
c. Output Value
d. Compare the object property
Ans: a

21. You will use the recording mode for an object not recognized by QuickTest.
a. Low-Level Recording Mode
b. Normal recording Mode
c. Analog Mode
Ans: a

22. The statement that calls the recorded analog file is
a. RunAnalog
b. CallAnalog
d. ExecuteAnalog
Ans: a

23. An action can be called by other tests or actions is
a. Call Action
b. Split Action
c. Reusable Action
Ans: c

24. You can replace the page in your Active Screen tab
a. False
b. True
Ans: b

25. QuickTest adds a checkpoint statement in the Expert View as
a. Check Checkpoint
b. Checkpoint
Ans: a

WINRUNNER Objective Questions Pdf Free Download ::

26. A Checkpoint checks that a text string is displayed within a defined area in a Windows application is
a. Accessibility
b. Text Area
c. Standard
d. Text
Ans: b

27. In ActiveX environment an Accessibility checkpoint is supported.
a. No
b. Yes
Ans: a

28. Can we get the execution time for an action in a Test.
a. Yes
b. No
Ans: a

29. Can we add external library files in QTP ?
a. No
b. Yes
Ans: b

30. The method used to get data from HTML Table is
a. GetData(Row,Col)
b. GetRowValue(Rowid,Colname)
c. GetCellData (Row,Col)
Ans: c

31.The Command used to insert the transactions in test is,
a. StartTransaction(“Name”), EndTransaction(“Name”)
b. Services.StartTransaction “Name”, Services.EndTransaction “Name”
c. StartTransaction.services “Name”, EndTransaction.services “Name”
Ans: b

32. A step in which one or more values are captured at a specific point in your test and stored for the duration of the run session is
a. Output Value
b. Checkpoints
c. Active Screen
Ans: a

33. QuickTest can detects an application crash and activate a defined recovery scenario to continue the run session.
a. True
b. false
Ans: a

34. In Batch Test process, the test list are saved in file format as,
a. *.mtb
b. *.mts
c. *.mbt
d. *.mtr
Ans: a

35.The command used to invoke other application from QTP,
a. InvokeApplication
b. SystemUtil.Run
c. Run
d. Both b & c
e. Both a & b
Ans: e

36.The command used to retrieve data from excel sheet is
a. Set ab = Connection(“srcfilepath “) , Set ws = ab.getdata(sheetid)
b. Set ab = CreateObject(“srcfilepath “) , Set ws = ab.getsheet(sheetid)
c. Set ab = GetObject(“srcfilepath”) , Set ws = ab.worksheets(sheetid)
Ans: b

37. The method that explicitly activates the recovery scenario mechanism is,
a. recovery.activate
b. enable
c. recovery.enable
d. activate
Ans: a

38. The method used for sending information to the test results.
a. Reporter.log()
b. Reporter.reportevent()
c. Reporter.msgbox()
d. Reporter.report()
Ans: b

39.To terminate an application that is not responding we use,
a. SystemUtil.terminate
b. SystemUtil.Stop
c. SystemUtil.CloseProcessByName
Ans: c

40. The recovery mechanism does not handle triggers that occur in the last step of a test
a. false
b. True
Ans: b

41. We can add Test object methods, function calls into the Test using
a. Function generator
b. Step generator
c. Object repository
Ans: a

42. The method that adds to the test while implementing Synchronization is
a. Synchronize
b. Wait
c. WaitProperty
d. Pause
Ans: c

43. The mechanism used to identify objects during run session is
a. Recovery scenario
b. Smart identification
c. Handling object
Ans: b

44. Post-recovery test run options specifies
a. how to continue the run session after QTP identify the event
b. errors while running
c. recovery scenario during a run session
Ans: a

45. The action that can be called multiple times by the test as well as by other tests is called
a. non-reusable action
b. Reusable action
c. External action
Ans: b

46. The command used to connect with Database is
a. Createobject(connectivity name)
b. dbconnect(connectivity name)
c. open(connectivity name)
d. None of the above
Ans: a

47. The method used to retrieve the folders is
a. FileSystemObject.Getfolder()
b. FileSystemObject.selectfolder()
c. FileSystemObject.retrievefolder()
Ans: a

48. The method used to compare 2 XML files is:
a. XMLfile1.compare(XMLfile2)
b. XMLcompare(file1,file2)
c. compare(XMLfile1,XMLfile2)
Ans: c

49. The QTP script files are stored in the extension of
a. *.mts
b. *.usr
c. *.mtr
d. *.vbs
Ans: a

50. The method used to register the user-defined function with test object is
a. setFunc()
b. RegisterUserFunc()
c. RegisterFunc()
Ans: b

WINRUNNER MCQs ::