Showing posts with label QTP. Show all posts
Showing posts with label QTP. Show all posts

Monday, 7 October 2013

Changing the Maven Local Repository




The maven local repository is a local folder that is used to store all your project’s dependencies (plugin jars and other files which are downloaded by Maven). In simple, when you build a Maven project, all dependency files will be stored in your Maven local repository.
By default, Maven local repository is default to .m2 folder :
  1. Unix/Mac OS X – ~/.m2
  2. Windows – C:\Documents and Settings\{your-username}\.m2

1. Update Maven Local Repository

Normally, I will change the default local repository folder from default .m2 to another more meaningful name, for example, maven-repo.
Find {M2_HOME}\conf\setting.xml, update localRepository to something else.
{M2_HOME}\conf\setting.xml

<settings>
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
 
<localRepository>D:/maven_repo</localRepository>

2. Saved it

Done, your new Maven local repository is now changed to D:/maven_repo.

2. Saved it

Done, your new Maven local repository is now changed to D:/maven_repo.

Code to Restart and Shutdown the System in QTP

strComputer = "dscp xxxxx“         ' Mention machine name / IP address
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem In colOperatingSystems
    objOperatingSystem.Reboot()
//objOperatingSystem.Win32Shutdown(1)    ‘ “1” is for Shut Down -->for shudowning

Next

Code To Know Complete System Information In QTP

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
                        & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
           
Set colSettings = objWMIService.ExecQuery _
                        ("Select * from Win32_OperatingSystem")
           
For Each objOperatingSystem in colSettings
            Msgbox "OS Name: " & objOperatingSystem.Name
            Msgbox "Version: " & objOperatingSystem.Version
            Msgbox "Service Pack: " & _
                                    objOperatingSystem.ServicePackMajorVersion _
                                                & "." & objOperatingSystem.ServicePackMinorVersion
            Msgbox "OS Manufacturer: " & objOperatingSystem.Manufacturer
            Msgbox "Windows Directory: " & _
                                    objOperatingSystem.WindowsDirectory
            Msgbox "Locale: " & objOperatingSystem.Locale
            Msgbox "Available Physical Memory: " & _
                                    objOperatingSystem.FreePhysicalMemory
            Msgbox "Total Virtual Memory: " & _
                                    objOperatingSystem.TotalVirtualMemorySize
            Msgbox "Available Virtual Memory: " & _
                                    objOperatingSystem.FreeVirtualMemory
            Msgbox "Size stored in paging files: " & _
                                    objOperatingSystem.SizeStoredInPagingFiles
Next
           
Set colSettings = objWMIService.ExecQuery _
                        ("Select * from Win32_ComputerSystem")
           
For Each objComputer in colSettings
            Msgbox "System Name: " & objComputer.Name
            Msgbox "System Manufacturer: " & objComputer.Manufacturer
            Msgbox "System Model: " & objComputer.Model
            Msgbox "Time Zone: " & objComputer.CurrentTimeZone
            Msgbox "Total Physical Memory: " & _
                                    objComputer.TotalPhysicalMemory
Next
           
Set colSettings = objWMIService.ExecQuery _
                        ("Select * from Win32_Processor")
           


For Each objProcessor in colSettings
            Msgbox "System Type: " & objProcessor.Architecture
            Msgbox "Processor: " & objProcessor.Description
Next
           
Set colSettings = objWMIService.ExecQuery _
                        ("Select * from Win32_BIOS")
           
For Each objBIOS in colSettings
            Msgbox "BIOS Version: " & objBIOS.Version
Next






Wednesday, 28 August 2013

Naming Conventions while writing the QTP Script

Naming Conventions

Automation Components:


• Modules:
  For modules, we should give a name as
  Syntax: Module_<TestCaseName> (Here Module name is one which Calling the Test case from Main Test Case)
  Ex: Module_ Book_Flight (It's a reusable script)
   
• Business/Main Scripts:
  Syntax: Script_<TestCaseName>
  Ex:  Script_ Flight_Application


• Functions:
  Syntax: Function_<Function Name>
  Ex: Function_Login
• Shared Repository:
  Syntax: Repository_<Module Name>
  Ex: Repository_Flight_Applications.tsr
• Test Data( For Excel file):
  Syntax: TestData_<ModuleName>
  Ex: TestData_Flight_Applications.xls

Retriving the test resources after crashing

1. Go to Run prompt and type %temp% to go to temp directory

2. Open TD_80 folder

3. Test resources will be stored in this location during execution when the scripts are run from QC.

4. You can take the back up from this location.

Clearing the Browser History using .bat file

Copy the following code and put into  notepad and save it as Any_Name,bat file

@Echo off 
echo * Cleaning History * 
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351 
echo *done* 
cls

Just double click the file. History is cleared


you can pass this bat file to QTP script so that we can clear the browser history run time

Tuesday, 27 August 2013

How to retrieve tooltip in QTP


Different way to retrieve the tooptip for web objects.

Retrieve the tooltip of the Web objects:

There isn't any direct property of any of the web object that gives you the tooltip. But if you will see the source code of the object you will find out that it is the title property of th object which appears as the tooltip.

Below are the couple of ways to retrieve the tooltip.


1)Retrive the tooltip from outerhtml property

The title property resides in the OuterHtml property of any object. So what i did is, i made a function to fetch the title property as below.
Example:
This retrives the tooltip of the Edit box appears on the "Google.com" website. The same way you can retrieve the tooltip of web buttons.







 


SystemUtil.Run "iexplore.exe","Google.com"
outerhtml = Browser("Title:=Google").page("title:=google").webedit("name:=q").GetROProperty("outerhtml")
msgbox Find_ToolTip( outerhtml )

Function Find_ToolTip(outerhtml)
temp = RegExp("title=.*""",outerhtml)
Find_ToolTip = RegExp(""".*""",temp)
End Function


Function RegExp(patrn, strng)
Dim regEx, Match, Matches ' Create variable.
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = patrn ' Set pattern.
regEx.IgnoreCase = True ' Set case insensitivity.
regEx.Global = True ' Set global applicability.
Set Matches = regEx.Execute(strng) ' Execute search.
If Matches.count > 0 Then
RegExp = Matches(0).Value
else
REgExp=""
End If

End Function


I know this is the tedious way to retrieve the tooltip. So Then something else comes in my mind and I found out the eaistest way to retreive it.

2) Retrieve tooltip using DOM.

You can easily retrieve the title property of the object using DOM.

Example:
msgbox Browser("name:=Google").Page("title:=Google").WebEdit("name:=q").Object.title

Wednesday, 19 June 2013

Object Identification in QTP




Overview:
Generally for every object 20-25 properties information available, qtp recognizes object using 2 0r 3 important properties.

Qtp has default object identification configuration for every environment, if we feel that config is not sufficient for recognizing objects in our application, we can configure some more

Object Identification Types


a)    Normal identification

1)   Mandatory properties
2)   Assistive properties

b)    Smart identification

1)    base filter properties
2)    optional filter properties

c)    Ordinal identifier
 
1)    location
2)    index
3)    creation time(only for Browser)

QTP learns information in the following in case of normal identification:
 

First of all the qtp learns all the mandatory properties at a time and thinks whether these properties sufficient to identify the object uniquely. if it feels sufficient then it stops learning otherwise,
It learns first assistive property and once again stops and thinks, like this qtp learns one by one. At the end of assistive properties list also if it feels not satisfied and it finally goes to Ordinal Identifier.


QTP learns information in the following in case of Smart Identification:

Smart identification is an optional feature, if we feel normal identification is not sufficient for any object, and then we configure Smart Identification for that object, in order to avoid Ordinal Identifier.

After normal identification if qtp feels not satisfied then it goes to smart identification. in smart identification 2 types of properties available, first qtp learns all base filter properties at a time and thinks whether these properties are sufficient for identifying the object uniquely. If it feels sufficient, then it stops learning otherwise it goes Optional Filter Properties and learns one by one. Still it feels not satisfied finally it goes to Ordinal Identifier.

Ordinal identifiers:

There are 3 types of ordinal identifiers available

1) Location: is based on object location in the AUT ,location starts from zero.
 
2) index: it is based on sequence of the programs, index starts from zero
 
3) Creation time: it is based on loading time of the web objects. qtp generates 0,1,2 like numbers.

Tool Settings Globalization:

As QTP is a I-tier(Stand-alone) application,making Tool settings globally is not possible.


For making tool settings global, QTP is providing a special feature called "Generate Script".

STEPS:

1) Settings available in 3 areas.
    

    a) File->Settings
    b) Tools->Options
    c) Tools->Object Identification

2) Perform required settings and generate Scripts

3) Share Script files to team members and ask them to execute those scripts.

NOTE: After executing these scripts all team members can get same settings.
When a QTP Test is run, QTP checks for Logical name and the control checks in the object repository for Test Object and corresponding Properties of the test object and based on these details QTP checks for the run time object in the AUT and performs the actions associated with the run time object.

Note: The logical name in the script and the name of the test object in the Object Repository should be the same. These are steps performed to identify an Object.


Step 1: During a run session, QTP encounters a line of Code, picks the Logical name from the Script.

Step 2: The control goes to the Object Repository, Quick Test searched for a test object with the logical name.

Step 3: Once the Test Object is found, Quick Test picks the properties of the object listed in the Test Object Details section of the Object Repository (OR).

Step 4: The control goes to the AUT, makes use of these properties to uniquely identify a Run Time Object.

Step 5: Once the Object Identification is completed, Quick Test executes the specified method on the Object.

Repeats all the steps till all the lines of code is executed.

Note: It is always good to have User Friendly Logical names for Test Object in the Local Repository. For Example WinButton("Button").Click to open a New Page can be written as WinButton("New").Click which is user friendly.

To change the Name of the Object if you change in the Script it would not make the changes in the Object Repository but if you select the Test Object in the Object Repository and change the Object name in the properties window then it would be replicated in the Script.

Tuesday, 18 June 2013

QTP Commands And Its Usage


QTP Commands

QTP Commands are available in 3 ways.
1.Menu options
2.Tool Bar options
3.Short cut keys (for Some important operations only)
File menu: Through file menu user can create, save tests, open existing tests, export tests in zip format.

Command
Function
New > Test
Creates a new test.
New > Business Component
Creates a new business component.
New > Scripted Component
Creates a new scripted component.
New > Application Area
Creates a new application area.
New > Function Library
Creates a new function library.
Open > Test
Opens an existing test.
Open > Business/Scripted Component
Opens an existing business or scripted component.
Open > Application Area
Opens an existing application area.
Open > Function Library
Opens an existing function library.
Close
Closes the active function library.
Close All Function Libraries
Closes all open function libraries.
Quality Center Connection
Opens the Quality Center Connection dialog box, enabling you to connect to aQuality Centerproject.
Quality Center Version Control
Provides a sub-menu of options for managing versions of QuickTest assets inQuality Center. The sub-menu is available only when you are connected to version-control enabledQuality Centerproject.
Save
Saves the active document.
Save As
Opens the relevant Save dialog box so you can save the open document.
Save Test with Resources
Saves a standalone copy of the current test together with its resource files.
Save All
Saves all open documents.
Enable Editing
Makes read-only function libraries editable.
Export Test to Zip File
Creates a zip file of the active document.
Import Test from Zip File
Imports a document from a zip file.
Convert to Scripted Component
Converts a business component to a scripted component.
Print
Prints the active document.
Print Preview
Displays the Keyword View as it will look when printed and enables you to modify the page setup.
Settings
Opens the Settings dialog box, enabling you to define settings for the open document. (Not relevant for function libraries)
Process Guidance Management
Opens the Process Guidance Management dialog box, enabling you to manage the list of processes that are available in QuickTest.
Associate Library '<Function Library Name>' with '<Document Name>'
Associates the active function library with the open document. (Available only from function libraries)
Recent Files
Lists the recently viewed files.
Exit
Closes the QuickTest session.
Edit Menu: It provides editing options and renaming, deleting and splitting actions.


Command
Function
Undo
Reverses the last command or deletes the last entry you typed.
Redo
Reverses the most recent operation of the Undo command.
Cut
Removes the selection from your document.
Copy
Copies the selection from your document.
Paste
Pastes the selection to your document.
Delete
Deletes the selection from your document.
Copy Documentation to Clipboard
Copies the content of the Documentation column of the Keyword View, enabling you to paste it in an external application.
Action > Split Action
Separates an action into two sibling actions or into parent-child nested actions.
Action > Rename Action
Changes the name of an action.
Action > Delete Action
Enables you to remove the selected call to the action, or delete the action and its calls from the active test.
Action > Action Properties
Enables you to specify options, parameters, and associated object repositories for a stored action.
Action > Action Call Properties
Enables you to specify the number of run iterations according to the number of rows in the Data Table, and to define the values of input parameters and the storage location of output parameters.
Step Properties > Comment Properties
Opens the Comment Properties dialog box for a comment step. Available only when the selected step is a comment.
Step Properties > Object Properties
Opens the Object Properties dialog box for a selected object. Available only when the selected step contains a test object.
Step Properties > Checkpoint Properties
Opens the relevant Checkpoint Properties dialog box for a selected object. Available only when the selected step is a checkpoint step.
Step Properties > Output Value Properties
Opens the relevant Output Value Properties dialog box for a selected object. Available only when the selected step is an output value step.
Step Properties > Report Properties
Displays the Report Properties dialog box for a report step. Available only when the selected step is a Reporter.ReportEvent step.
Find
Searches for a specified string.
Replace
Searches and replaces a specified string.
Go To
Moves the cursor to a particular line in the test.
Bookmarks
Creates bookmarks in your script for easy navigation.
Advanced > Comment Block
Comments out the current row, or selected rows.
Advanced > Uncomment Block
Removes the comment formatting from the current or selected rows.
Advanced > Indent
Indents the step according to the tab spacing defined in the Editor Options dialog box.
Advanced > Outdent
Outdents the step (reduces the indentation) according to the tab spacing defined in the Editor Options dialog box.
Advanced > Go to Function Definition
Navigates to the definition of the selected function.
Advanced > Complete Word
Completes the word when you type the beginning of a VBScript method or object.
Advanced > Argument Info
Displays the syntax of a method.
Advanced > Apply "With" to Script
Generates With statements for the action displayed in the Expert View, and enables IntelliSense within With statements.
Advanced > Remove "With" Statements
Converts any With statements in the action displayed in the Expert View to regular (single-line) VBScript statements.
Optional Step
Inserts an optional step (a step that is not required to successfully complete a run session).

View menu: Through this menu we can launch and close, active screen, Data Table, Debug viewer, information, missing resources etc.

Insert Menu: Through this menu user can inserting check points, out put values, synchronizing points.
In this menu step generator available, using this user can generate recordable and non-recordable scripts.
Through insert menu user can insert VB Script conditional and loop statements and transaction points (Start and End).
Through insert menu user can create new actions, call existing actions and copy existing actions.

Automation Menu:
This menu provides Record, Run options and Run setting options
Through this menu we can start normal recording, analog recording and Low level recording.
Through this menu we can stop recoding, running and also we run tests.

Command
Function
Record
Starts a recording session.
Run
Starts a run session from the beginning or from the line at which the session was paused.
Stop
Stops the recording or run session.
Run Current Action
Runs only the active action.
Run from Step
Starts a run session from the selected step.
Maintenance Run Mode
Starts a run session during which the Maintenance Run Mode wizard opens for steps that failed because an object was not found in the application (if applicable).
Update Run Mode
Starts a run session to update test object descriptions and other options (if applicable).
Analog Recording
Starts recording in Analog Recording mode.
Low Level Recording
Starts recording in Low Level Recording mode.
Record and Run Settings
Opens the Record and Run Settings dialog box, enabling you to define browser preferences for recording and running your test.
Process Guidance List
Lists the processes that are available for the current document type and for the currently loaded QuickTest add-ins, enabling you to open them.
Results
Enables you to view results for a test run session.

Resources Menu:

This menu provides object repository and recovery scenarios options.
Through this menu we can create /modify/delete objects information and we can associate repositories.
Through this menu we can create, modify and delete recovery scenarios.

Command
Function
Object Repository
Opens the Object Repository window, which displays a tree containing all objects in the current test or component.
Object Repository Manager
Opens the Object Repository Manager dialog box, enabling you to open and modify multiple shared object repositories.
Associate Repositories
Opens the Associate Repositories dialog box, enabling you to manage the object repository associations for the test.
Map Repository Parameters
Opens the Map Repository Parameters dialog box, enabling you to map repository parameters, as needed.
Recovery Scenario Manager
Opens the Recovery Scenario Manager dialog box.
Associated Function Libraries
Lists the function libraries associated with the active document, enabling you to open them.

Debug Menu:
This menu provides debug commands for step by step execution.
Through this menu we can insert/remove/break points.
 
Tools Menu:
This menu provides Tools settings option, view options and object identification configuration.
Through this menu we can set tool options as well as test pane view options.
In this menu object spy option available, through this we can get object’s information.(Properties and values)
In this menu Virtual object option available; through this option we can create virtual objects.
 

Command
Function
Options
Opens the Options dialog box, enabling you to modify global testing options.
View Options
Opens the Editor Options dialog box, enabling you to customize how tests and function libraries are displayed in the Expert View and Function Library windows.
Check Syntax
Checks the syntax of the active document.
Object Identification
Opens the Object Identification dialog box, enabling you to specify how QuickTest identifies a particular test object.
Object Spy
Opens the Object Spy dialog box, enabling you to view the native properties and operations of any object in an open application, as well as the test object hierarchy, identification properties, and operations of the test object that QuickTest uses to represent that object.
Web Event Recording Configuration
Opens the Web Event Recording Configuration dialog box, enabling you to specify a recording configuration level. (Relevant for tests only)
Data Driver
Opens the Data Driver dialog box, which displays the default Constants list for the action. (Relevant for tests only)
Change Active Screen
Replaces the previously recorded Active Screen with the selected Active Screen. (Relevant for tests only)
Virtual Objects > New Virtual Object
Opens the Virtual Object Wizard, enabling you to teach QuickTest to recognize an area of your application as a standard test object.
Virtual Objects > Virtual Object Manager
Opens the Virtual object Manager, enabling you to manage all of the virtual object collections defined on your computer.
Customize
Opens the Customize dialog box, which enables you to customize toolbars and menus, and create new menus.

Window Menu:
This menu provides QTP tool window style settings.

Help Menu:
This menu provides QTP help as well as VB Script help.
Through this menu we can contact technical support people and we can send feedback.
Through this menu we can check for updates and download or install directly.

Handling Virtual Objects In QTP

Virtual Object

Virtual Objects comes into picture if QTP is unable to recognize an object and we often see errors as Object not found. This is because even though you have recorded the actions during playback time QTP is unable to recognize an object and because of which the script fails.


Virtual object enable you to create and run tests on objects that are not normally recognized by QuickTest. Your application may contain objects that behave like standard objects but are not recognized by QuickTest. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box. QuickTest emulates the user's action on the virtual object during the run session. In the test results, the virtual object is displayed as though it is a standard class object.


You define a virtual object using the Virtual Object Wizard (Tools > Virtual Objects > New Virtual Object). The wizard prompts you to select the standard object class to which you want to map the virtual object. You then mark the boundaries of the virtual object using a cross-hairs pointer. Next, you select a test object as the parent of the virtual object. Finally, you specify a name and a collection for the virtual object. A virtual object collection is a group of virtual objects that is stored in the Virtual Object Manager under a descriptive name.


Virtual Objects in QTP are created to resolve the object recognition problems in QTP. When an area of an application is not recognized by QTP we use the Virtual Object Wizard to map the area to a standard Class. These virtual objects are generally used to resolve the object recognition problems. All the Virtual Objects created are stored in the Virtual Object Manager. After we have learned an object as a Virtual Object we can record on that object successfully. You can create a Virtual Object by navigating to Tools, Virtual Objects, and New Virtual Object.

What is Virtual Object Collection?
 A virtual object collection is a group of virtual objects that is stored in the Virtual Object Manager under a descriptive name.


How to disable virtual Objects while recording?

In order to disable the Virtual Objects Navigate

Go to Tools-->Options--> General Tab--> Disable Recognition of virtual objects while recording

Check and uncheck this option to disable or enable virtual objects while recording.


Storage location of Virtual Objects

 If you create any virtual objects automatically those objects will be stored in

“QuickTest installation folder\ dat \ VoTemplate”


Extension of virtual objects file

 .VOT


How to use virtual objects on different machines?

After creation of virtual objects copy QuickTest installation folder\ dat \ VoTemplate Folder to other machines on which you want to use virtual objects.


Limitations and drawbacks of Virtual Objects

      1. QuickTest does not support virtual objects for analog or low-level recording.
      2. Not possible to apply a checkpoint on a virtual object
      3. Not possible to add virtual objects using Object Repository
4. Virtual Objects doesn’t support all objects and methods. 
 5. We cannot use object spy on a Virtual Object.
6. We can only record on Virtual Objects.
7. Scroll Bars and Labels cannot be treated as Virtual Objects.
8. May not run perfectly on different screen resolutions if a test using Virtual Objects.
9. Virtual object uses the properties Name, Height, Width, X, Y which the properties are having maximum possibilities for frequent change.
10. During a run session, make sure that the application window is the same size and in the same location as it was during recording, otherwise the coordinates of the virtual object relative to its parent object may be different, and this may affect the success of the run session.
  11. You can use virtual objects only when recording and running a test. You cannot insert any type of checkpoint on a virtual object, or use the Object Spy to view its properties.
        12. To perform an operation in the Active Screen on a marked virtual object, you must first record it, so that its properties are saved in the test object description in the object repository. If you perform an operation in the Active Screen on a virtual object that has not yet been recorded, QuickTest treats it as a standard object.

When Object recognition Problem occurs in QTP during playback on the Application Under test there are ways to handle this Object Recognition Problem. It depends solely on the user as to what they want to use.

The different ways to handle Object Recognition Problem are:

1. By Creating Virtual Objects.
2. Using Low Level Recording.
3. Using Analog Recording.

Tuesday, 28 May 2013

QTP Interview Questions for 2+ exp


1. Explain QTP automation framework.

2. What is HYBRID framework?

3. What are the Features & Benefits of QTP?

4. What are the types of Object Repositories in QTP?

5. Which object repository we use in real time and can we merge 2 object repostiory and

how? 
as said there r 2 types of object repository i.e.

1) per action

2) shared mode

by default its per action but in real time we use shared mode.

yaa we can merge two obj rep by an option " merge object

repositories in Quick Test Plus.

6. Explain the concept of object repository.

7. How QTP recognizes objects?

8. WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP? 
1)the use of functional generator in
qtp is which lists out

the all the built in functions in qtp and helps you to

write the vb script for un known objects.

2)it is also used to reduce the typing mistakes & synta

errors


9. What is User defined function in QTP 
user defined function is nothing but ,u can define ur own

fuction for particular functionality.

Normaly we will create user defined functions for the

reusable functionality(which is available in ur

application)

10. How we can add actions in the test using QTP? 
there four actions call to action ,copy of action,call to

exesitng action,call to winner,split action just right

click on any one select it



11. How to write script in qtp(vbscript), I mean without application deployed..and how to call

script1 into script2?
 runaction actionname(iteration mode,iteration

range,parameters)

12What is the differnce between action & script? 
A script can have multiple actions.

A script is a test case which have multiple actions.

For an example, for an functional testing you can single

action which can be considered as a script

For integration testing you

can add multiple actions which

is also considered together as a script

12. what will happen in object repository(shared) if we call an existing action from an

external action? and what happen in object repository(per action)if we call an existing

action from an external action?

13. Suppose I have 5 Actions in my Test script. Out off which i want to make 3rd action as

my start-up action. How should i make it?

14. What is the difference between Call Run action and copy of action?

15. What are reusable actions?

16. What is the difference between functions and actions in QTP?

17. What is the difference between function and sub-routine.?

18. What is batch testing?

19. HOW TO DO THE BATCH TESTING USING QTP?

20. In how many ways you perform batchtesting?

21. Write a sample script/ small code snippet to COUNT TOTAL NUMBER OF HYPERLINKS on

a webpage.

22. Write a sample script/ small code snippet to select any radio-button or checkbox on a

webpage.

23. What is descriptive programming.? What are it’s pros and cons.?

24. Have you ever written a compiled module? If yes tell me about some of the functions

that you wrote.

Ans: I Used the functions for Capturing the dynamic data during runtime. Function

used for Capturing Desktop, browser and pages.



25. Can you do more than just capture and playback in QTP?

26. What is the difference between check point and output value.

27. Discuss QTP Environment.

28. Differentiate the two Object Repository Types of QTP.

29. How to handle dynamic objects in QTP?

30. How many checkpoints can be used in QTP.?

31. Is it possible to connect QTP with QC.? If Yes then how.?

32. Can the defects be logged automatically in QC for a script getting failed of a testcase.?

If Yes then how.?

33. What is a Run-Time Data Table? Where can I find and view this table?

34. What is the difference between image checkpoint and bitmap checkpoint

35. What is the concept of checkpoint declaration in the QTP mainly for the Objects, Pages,

Text and Tables ?

36. What is the limitation to XML Checkpoints?

37. What is the use of Accessibility check point?

38. Where is the bitmap checkpoint be saved?

39. In how many ways we can add check points to an application using QTP.?

40. What is the difference between Table checkpoint and Database checkpoint in QTP?

41. What is parameterization? How we can implement it in QTP.?

42. In how many ways does parameterization can be done in QTP?

43. How does Parameterization and Data-Driving relate to each other in QTP?

44. What are the properties you would use for identifying a browser & page when using

descriptive programming ?

45. What are the different scripting languages you could use when working with QTP ?

46. Explain the keyword createobject with an example.

47. How to handle the exceptions using recovery secnario manager in QTP?

48. How to use the Object spy in QTP?

49. what is the use of Text output value in Qtp?

50. What is the file extension of the code file & object repository file in QTP?

51. Can we merge two object repositories.? If Yes then How.?



52. How to make arguments optional in a function?

53. How to covert a String to an integer?

54. Inserting a Call to Action is not Importing all columns in Datatable of globalsheet. Why?

55. How to supress warnings from the "Test results page"?

56. When we try to use test run option "Run from Step", the browser is not launching

automatically why?

57. Does QTP is "Unicode" compatible?

58. How to "Turn Off" QTP results after running a Script?

59. How to verify the Cursor focus of a certain field?

60. How to handle Run-time errors in QTP?

61. How to change the run-time value of a property for an object?

62. How to retrieve the property of an object?

63. How to open any application during Scripting?

64. What Types of properties that QTP learns while recording?

65. Can we Script any test case with out having Object repository? or Using Object

Repository is a must?

66. How to execute a WinRunner Script in QTP?

67. 3 differences between QTP & Winrunner?

68. How to add a runtime parameter to a datasheet?

69. What scripting language is QTP of ?

70. How we can Analyze the Checkpoint results.?

71. what do you call the window testdirector-testlab?

72. How to Import data from a ".xls" file to Data table during Runtime.

73. How to export data present in Datatable to an ".xls" file?

74. Where can I find information on the IE Document Object Model?

75. How to terminate an application that is not responding?

76. How to record on non standard menus?

77. How to configure Quick Test to record on Embedded HTML Controls?

78. How do I launch a new browser from a test?

79. How do I make the test prompt the user for input while it is running?

80. How to remove result files from old tests?

81. How to change the logical name of a Test Object?

82. What is the significance of “Mic.ini file” in QTP.?How we can modify it.?

83. How to change the registry settings for QTP?

84. How to use Environment variable?

85. Does Quick Test have any debugging capabilities?

86. What command-line arguments can I use when launching Quick Test?



87. I have a Microsoft Access database that contains data I would like to use in my test.

How do I do this?

88. How do I add a manual wait step to my test?

89. How the Smart identification mechanism works ?

90. What are the properties used by the Smart Identification mechanism?

91. Can I change the Active Screen page which is shown on every new test?

92. What is ACTION TEMPLATE in QTP? How we can create it?

93. How to pass parameters when calling actions?

94. How to configure the report to show only error (by default)?

95. What is the purpose of Object spy?

96. What is the return value of the ‘Quit’ Method?

97. What is the purpose of loading QTP Add-Ins?

98. Can we re-use the user defined Environment variables?

99. What is Object model ?

100. Can A user use object repository file for two different tests which Are running at the

same time??

101. How do you comment your script?

102. How do you handle pop-up exceptions?

103. What are batch tests and how do you create and run batch tests?

104. How do you store and view batch test results?

105. What are function Key Strokes?

106. How to record the function Key Strokes?

107. What are Environment variable?

108. How do you write messages to the report?

109. What is the diff between SystemUtil.Run and Invoke?

110. How can I improve the working speed of QTP?

111. How do I maintain my test when my application changes?

112. What are the new features available in QTP 9.5?

113. What is the Extensions of Script, Repositories Files?

114. How do you automate the Quick Test settings?

115. Explain about Update Run in QTP ?

116. Several QTP scripts may be called in a BPT test. Each one may have different data in a

data table. How can the BA in BPT override and control data tables?

117. Can users who prefer descriptive programming in QTP have the ability to SaveAs

Descriptive? If this is chosen, the OR values could be saved in the script instead of the

logical values.

118. Will QTP/BPT work with descriptive programming or only through the object repository?

 

119. Win Runner uses TSL which is a derivative of C. QuickTestPro is VBScript. How are

you going to be able to port Win Runner scripts to QuickTestPro?

120. How are checkpoint baseline values and the purpose of the checkpoint

communicated back to the BA in BPT ?

121. Can it be confirmed that Quality Center works with Microsoft SQL Server?