Top 105 QTP Interview Questions and Answers (Latest UFT Interview Questions)

By Vijay

By Vijay

I'm Vijay, and I've been working on this blog for the past 20+ years! I’ve been in the IT industry for more than 20 years now. I completed my graduation in B.E. Computer Science from a reputed Pune university and then started my career in…

Learn about our editorial policies.
Updated May 22, 2024
Edited by Swati

Edited by Swati

I’m Swati. I accidentally started testing in 2004, and since then have worked with at least 20 clients in 10 cities and 5 countries and am still counting. I am CSTE and CSQA certified. I love my job and the value it adds to software…

Learn about our editorial policies.

Enlisted below are some useful tips to prepare for HP (now Micro Focus) QTP/UFT interview, along with the most common QTP/UFT Interview Questions and Answers.

We planned this post at the end of our QTP training article series but many readers requested to provide interview questions so as to prepare for the interview while learning QTP.

=> Click Here For The QTP Training Tutorials Series

QTP Interview Questions and Answers

Note – In this post, we have covered some useful tips to prepare for the QTP interview along with the top 80 common and crucial Quick Test Professional questions and answers. 

We devised a list of pre-requisites or non-technical aspects that every QTP interviewee has to be familiar with.

Useful Tips To Prepare For QTP/UFT Interview

QTP Questions
  • QTP is merely a tool that facilitates testing. The ultimate goal of QTP – or any other testing tool for that matter- is efficient and effective testing. So make sure that your testing fundamentals are solid.
  • Next undeniably is the knowledge about the QTP tool. Make sure you know all the basic information about the tool.
  • QTP predominantly relies on a tester’s programming skills to design, develop and maintain tests. That does not mean knowing all the features of the tool or VB Script is enough. The most important skill the automation tester should have is the ability of logic building. QTP tools and VB Script are simply vehicles that help you to reach a solution.
  • In recent days, most interviewers are asking questions that either involve writing a script on paper or coding on a QTP installed on the machine. If you can code on a machine or write the code spontaneously, that’s great! If not, I suggest you write the solution to the problem given to you in simple English statements. This will give you a chance to showcase your solution forming ability. Explain that to translate this solution into a program is simply a matter of referring to the help files of the programming language to find the equivalent statements.
  • In an interview, when you are writing code, please do not forget to include comments. Showcase good programming practices.
  • Before attending a QTP interview, be sure to know the version of the QTP, the add-ins that you use, the versions of all the other software you are using, etc.
  • If you have not been using QTP recently but have had past experience, it would take a couple of hours to re-familiarize with the IDE.

The most common but crucial questions that are asked in the QTP interview: The best part of these questions is that you have time to prepare an answer in advance even before the interview begins.

  • What are the reasons for choosing to automate your project and why did you choose QTP?
  • What was the most challenging testing situation you faced and how did you overcome it?
  • Did QTP prove efficient for your project? Yes or No, explain?
  • How did you achieve reusability via QTP?
  • Did you find anything in your project that QTP proved inefficient to perform?
  • Under what conditions would you recommend QTP for future projects?

We suggest you spend some time with these questions and come up with answers based on your practical experience from using QTP in your respective projects.

Another important question that your interviewer would be interested to know is the statistics.

For example,

  • How many scripts did you have?
  • How often were they executed?
  • How many lines of code are there in each script?
  • Do you use function libraries and/or shared ORs?
  • How long will it take to develop a script?
  • Do the scripts need a lot of maintenance? If yes, why?

Again, be sure to be prepared with the answers to these questions.

The last piece of advice, be honest and straightforward. Keep in mind that not all projects are the same and not everybody follows the same methods. We recommend that you have a clear understanding of your project and exhibit the potential to learn. Nobody expects you to know everything; they only expect you to know what you do best.

Let’s move on to the technical QTP Testing questions. 

Given below are the questions that we have covered in the latest UFT Interview questions and answers as well.

QTP Interview Questions And Answers

Most Commonly Asked QuickTest Professional Interview Questions

Q #1) Different types of QTP test assets and their extensions:

Answer: 

types of QTP test assets and their extensions

Q #2) Technologies supported by QTP:

Answer: Web, Java (Core and Advanced),.Net, WPF, SAP, Oracle, Siebel, PeopleSoft, Delphi, Power Builder, Stingray 1, Terminal Emulator, Flex, Web Services, Windows Mobile, VisualAge Smalltalk, Silverlight and mainframe terminal emulator

Q #3) Does QTP run in any environment?

Answer: No, QTP works only in the Windows environment.

Q #4) Explain the views in the QTP GUI?

Answer:

Keyword view: This view is a tabular representation of all the objects and the actions that are performed on them. Every row in the table is a step performed on the AUT and can be modified. Some of the most common columns displayed are items, operations, values, and documentation.
Expert view: As the name indicates, this view is for technical users who would like to tweak the source code as per their requirements.

Q #5) What is QTP’s model for test creation?

Answer: 

  • Determine Testing needs – Define Testing Environment, Analyze Your Applications and Plan Actions
  • Set up repositories – Local or Shared OR
  • Define function libraries
  • Generate test steps – Add steps, Add checkpoints
  • Data drive your tests
  • Run the tests

Q #6) What are the different kinds of Test steps?

Answer: Given below are the 5 types of steps:

  • Test Object (Performs action on a TO)
  • Functions
  • Utility (Steps to control run session. For example, Reporter.report)
  • Comment
  • Programming logic (Loop, conditions…etc)

Q #7) What are the different ways to invoke an application using QTP?

Answer: 
a) SystemUtil.Run
SystemUtil.Run ( FileName, Parameters, Path, Operation )
Example: SystemUtil.Run(“iexplorer.exe”,http://www.google.com)
SystemUtil.Run(“test.txt”, “”,”C:\”,”1”)

b) InvokeApplication
Example: InvokeApplication “C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.google.com”

c) Creating a shell object using VB Script
Example: Create a “WScript.shell” object.
Dim testshell
Set testshell= CreateObject (“Wscript.shell”)
testshell.run “%windir%\notepad “

Q #8) What are the different Recording modes and how do they work?

Answer:

QTP provides 3 modes of Recording:

  • Normal Recording mode: The default recording method is always the normal mode. This method uses the model of Test Objects and Runtime objects to learn and act on the AUT.
  • Analog recording mode: Records the exact mouse and keystrokes that the user performs in relation to either the screen or the AUT window.  The steps that are recorded using this method cannot be edited.
    The way this usually gets represented in code is:
    Window/app.RunAnalog “Track1”
    One scenario in which this type of recording can be used is while trying to capture a signature.
  • Low-Level recording mode: This mode records the coordinates in the application where the operation is performed, irrespective of whether QTP recognizes the specific Object or Operation.

Q #9) Which Recording modes need more memory?

Answer: Analog and Low-level Recording modes.

Q #10) Is it possible to switch between Recording modes during a Test creation?

Answer: Yes, in the middle of recording, we can switch to Analog/Low-level mode, finish the task required and go back to normal recording. The switch to Analog mode is only available during recording and not during editing.

Q #11) Does Low-level Recording capture mouse movements?

Answer: No. Mouse movements are not captured.

Q #12) How does QTP identify an object?

Answer: QTP has a predetermined set of properties that it learns/stores for every class of object it identifies.

There are 3 aspects to this:

  • Mandatory Properties: This is the list of properties for a certain class that QTP always stores. We could say that this is the object description. It also checks this in conjunction with the parent object to see if the description is sufficient to identify the object uniquely.
  • Assistive Properties: If the description of mandatory properties is insufficient to identify the Object, then a set of non-mandatory properties will be added to the description one after the other until there is enough data to identify the object.
  • Ordinal Identifier: If the assistive properties also do not result in the unique identification of an object a special ordinal identifier is added by QTP, such as the object’s location on the page or in the source code.

Q #13) What is Smart Identification?

Answer: If the recorded description does not enable QTP to identify a specific object, then QTP uses the “Smart identification” mechanism.

It uses the following additional properties to identify the object:

  • Base Filter Properties (Primary): A set of properties that cannot be changed without changing the object type
  • Optional Filter Properties (Secondary): Additional properties that help to identify the object uniquely.

Q #14) What is Object Spy?

Answer: Object Spy is an extremely helpful tool that QTP has in order to view the properties and operations of an object in the AUT. It shows all the properties of the object and the corresponding values. It also shows the object hierarchy. There is also a provision that lets users add a certain object to the OR.

Q #15) What is an Object Repository?

Answer: OR is like a warehouse where all the objects in a test are stored. OR has the list of Objects that QTP learned during the recording process and the class to which they belong.

It stores a set of properties that uniquely identify the Object (description) and also names the object for the sake of identification in our test, based on its most prominent feature.

Q #16) What are the two types of repositories available, explain them?

Answer: Local and shared Repository, are the two kinds of available Repositories.

Every action by default has a local repository of its own and has all the objects that are used within it. Alternately, the tester can have a common repository for multiple actions so that all of them can share the objects that it contains. The common repository is called a shared OR.

Q #17) An action has both shared and local OR associated with it and both have the same object in them. Which one will be considered for the test?

Answer: If a local OR and Shared OR have an object with the same name, then the action will consider the object in its local OR.

Q #18) Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, then which one will be considered?

Answer: There can be more than one Shared OR’s associated with the same action. If Shared OR1 and Shared OR2 have one object named OBJ1 each and if the action calls for OBJ1 then the order in which the shared ORs were associated will be considered. This means that if the Shared OR1 was first associated then the OBJ1 from Shared OR1 will be taken into account.

Q #19) Can the user toggle between using Local OR and Shared OR for the same action?

Answer: Yes, it is possible to switch between one or the other types of ORs at any time. To do so, the menu option is Test -> Settings -> Resources and choosing the options accordingly.

Q #20) Are Shared ORs read-only?

Answer: By default, shared ORs are open as read-only. In order to open and edit them, you will have to open them from the Object Repository Manager.

“ORM -> File -> Enable Editing”

Q #21) What are the advantages of Test Automation?

Answer:

  • Time – It produces quick results.
  • No Manual intervention
  • Cost-effective
  • Not prone to human errors.

Q #22) If the objects hierarchy is changing from build to build, then how will you handle that condition?

Answer: In this case, the descriptive programming can be used instead of having an OR. Even while descriptive programming tries to use regular expressions to identify the unique property of the objects.

Q #23) I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”

Answer:

  • Firstly, QuickTest Add-In for Quality Center has to be installed.
  • In the QTP Tools -> Options -> run tab you should have ‘Allow other Mercury products to run tests and components’ selected.
  • Make sure you are running QTP as an Admin.
  • All test resources have to be on the correct path.

Q #24) What is the extension of the QTP Local Repository? If it is .mtr then what does .bdb extension stand for?

Answer: .bdb is the local OR. .mtr is a binary file that contains other information about checkpoints and all. To re-verify the .bdb is the OR, try to rename the file with the extension as .tsr and open it from ORM. The same objects in the OR will be displayed here. The same will not work if you try it on the .mtr file.

Q #25) What is a Virtual Object?

Answer: A virtual object is a non-standard object that is instructed by the tester via QTP to behave like a standard one. You can check for more details on this in tutorial #23

Q #26) How do you capture tooltip using QTP?

Answer: Tool Tip capture methods vary depending on the type of object this tooltip appears for. It could be for links, images or any other web elements.

  • For web elements use: Object.title property.
  • For image: Image(“some name”).GetROProperty(“alt”)…..etc.

Q #27) How can you close the second opened browser?

Answer: You can find out which browser instance was opened after another by using the “creation time” property. In simple terms, this is nothing but a counter for each browser instance that gets launched. For the first one, it is 0 and gets incremented from then on. To close the second opened browser, you can use the following code:

Browser(“creationtime:=1”).Close

Q #28) How do you know the number of browsers opened?

Answer: To do this, you will have to check how many child objects of the type ‘browser’ are present on the desktop.

The following is the code that explains it:

Set ObjectBrowser = Description.Create
ObjectBrowser(“micclass”).Value = “Browser”
Set BObj = Desktop.ChildObjects(ObjectBrowser)
Msgbox Obj.Count

Q #29) What is the synchronization point in QTP?

Answer: It is a feature that QTP provides to make your test wait until a certain property on a certain object becomes an expected value before proceeding with the next steps. You can check for more information in tutorial #24.

Q #30) What is a Reusable action?

Answer: An action that can be called multiple times within or outside the same test is called the Reusable action. By default, all actions are reusable. You can check for more information in tutorial #21.

Q #31) Why do we use breakpoints in QTP?

Answer: This is to stop the execution of your test at a certain point while it’s running.  Typically it is used to observe the state of your application or to understand how a certain feature works at a certain phase at runtime. (The check is, of course, a manual step.)

Q #32) What is a Throw object?

Answer: VB Script does not have any specific throw object. (At least to the best of my knowledge) This question will not come up unless a specific add-in that supports this feature is explored.

Q #33) How do you know the location Id of an object if you know its index id?

Answer: Location is the position of the object from left to right and top to bottom within the parent window, frame, or dialog box relative to other similar objects.

Index Id is the order in which the object appears in your AUT relative to other similar objects. For Example, if you have 2 links, then index id=0 will be the first link and index id=1 will be the second link.

The answer to this question is entirely dependent on where the object lies, whether it is within the same parent or not.

Q #34) What test cases can you automate using QTP?

Answer: As an automation enthusiast, I would say you can automate anything. It is only limited by your imagination and expertise. However, in case you need to understand the look, feel, or human reaction to a certain feature, then that is not possible. This is the case with any tool, not specific to QTP.

Q #35) How to handle the Java tree in QTP?

Answer: You will need to select and load the Java Add-in. Then you can record and work on a Java Tree object just like you would with any other object.

Q #36) How to give a call to another action from one action?

Answer: Calling one action from the other can be done by “Inserting a call” to an existing action or by creating a new action. Please refer to tutorial #21 for a detailed explanation.

Q #37) How to find Operating system information using the QTP script?

Answer: You can do that with the help of the environment variable. The exact variable is: OS and OSVersion are for the version information.

Q #38) How can you identify the browser and its information using the QTP script?

Answer: You can identify and act on any browser that you opened again by referring to its ‘creationtime’ property and using it like you would with a browser object in your OR.

Q #39) How are actions and functions different in QTP?

Answer: Actions have their own Datatables and OR, but functions don’t. More importantly, Functions are a VB Scripting element, not only applicable to QTP. Please refer to tutorial #21 for a detailed explanation of these.

Q #40) Explain how to use QTP to check broken links on a page.

Answer: Page checkpoint. You can incorporate this page checkpoint on every page to check for broken links. In order to do so, you can go to Tools -> Options -> Web -> Advanced and choose the option to check for broken links automatically on every page QTP accesses. Check for more information in tutorial #15.

Q #41) Can we run multiple QTP scripts one after the other without manual intervention? How?

Answer: Yes. To do so, you will have to create a batch file using the batch runner tool, and information about the same is available in tutorial #23.

Q #42) Explain the process of smart identification in QTP.

Answer: If the recorded description does not enable QTP to identify the specified object in a step, and a smart identification definition is defined (and enabled) for the object, then QTP tries to identify the object using “Smart identification”. For more information, please refer to tutorial #23.

Q #43) When to use a shared and local Object Repository?

Answer: The decision is completely up to you. Shared OR will make more sense if you have multiple scripts referring to the same objects.

Q #44) What are the advantages of Object Repository?

Answer: OR is an inbuilt feature provided by QTP to store your test objects. There are many advantages and the most important one is that it is a mandatory element unless you are going for descriptive programming. You can check for more information on OR in tutorial #22.

Q #45) In the Hybrid framework, data can access the database, excel file, XML, etc. Is that true?

Answer: Yes. Any of the mentioned data sources are permissible.

Q #46) How to associate function library at a run time?

Answer: 

  • You can do so by using the “LoadFunctionLibrary” method. LoadFunctionLibrary “Complete path”
  • You can also use the ExecuteFile method. ExecuteFile “Complete path”

Q #47) The hybrid framework can be implemented for any application. Is it true?

Answer: Yes

Q #48) Hybrid framework supports Descriptive programming. Is that true?

Answer: Yes. Frameworks are mostly based on how and where you want your test assets to be placed and how they are to be accessed for maximum efficiency. They do not restrict how you write your test itself.

Q #49) What are the advantages of a hybrid framework?

Answer: The hybrid framework is nothing but a combination of frameworks that make you arrive at a solution for your testing needs by taking what works best for your scenario. The obvious advantage is versatility. It can be tailored to meet any testing project’s need.

Q #50) What is a Procedure or Subroutine in VB Script?

Answer: The sub procedure is a series of VB Script statements (enclosed by Sub and End Sub statements) that perform actions but don’t return a value. A Sub procedure can take arguments (constants, variables, or expressions that are passed by a calling procedure). If a Sub procedure has no argument, then its sub statement must include an empty set of parentheses ().

Q #51) Is VB Script Case sensitive or Case insensitive?

Answer: It is not case sensitive with respect to command and variable names. Everything else, like strings (text) is.

Q #52) How to record applications running on the Virtual machine?

Answer: You can access and record the QTP script as long as the application is available to you via a browser and not by using the remote connecting software.

Q #53) What are the factors on which script execution time is dependent?

Answer:

  • Network and computer speeds. The response time from the app, the database, etc. This is true even if you are manually executing the test.
  • It also depends on the wait statements you have included.
  • Not loading the add-ins that your test does not use helps too.
  • Descriptive programming steps take longer than regular ones to execute.
  • Capturing screenshots at runtime through QTP also consumes time.
  • Disabling smart identification also speeds up the QTP script running time.

Q #54) What is the Test Fusion Report in QTP?

Answer: Test Fusion report as the name indicates is a detailed test result that QTP provides in a tree format. It has all the iteration information and data used for each of them along with the standard information.

Q #55) Both Static and dynamic arrays are handled by VB script. Is it true?

Answer: Yes. A static array is declared as Dim A(10). This means it’s an array of 11 items. If the tester needs to modify it to contain 20 items, then he can do so by using ‘redim’.

redim A(19) – there is a “Preserve” statement that can be used in conjunction with the redim statement. When preserve is used, all the previous values are not erased.

Q #56) What is the difference between the Keyword view and the Expert view?

Answer: These are the two ways in which QTP shows your test. Each one has its own features and caters to users of different levels of expertise.

Keyword view: This is a tabular representation of your test that has information like the Item, Operation, Data and, Comments.

Expert view: This displays your test in terms of the actual lines of code. It is more like a VB Script editor and is used by advanced users.

More information is available in tutorial #2 and tutorial #12.

Q #57) On the website, the protocol has been changed from http: to https what you will do? Tell me your approach.

Answer: Since the protocol change does not necessarily affect the UI change, except maybe for a warning message about certificates, there are not many changes. All you need to do is provide a new URL and make sure that you handle security-related pop-ups.

Q #58) What are the features and benefits of Quick Test Pro (QTP)?

Answer:

  • Keyword-driven testing
  • Suitable for both client-server and web-based applications.
  • VB script as the script language.
  • Better error handling mechanism.
  • Excellent data-driven testing features.

Q #59) How to handle the exceptions using the recovery scenario manager in QTP?

Answer: You can instruct QTP to recover unexpected events or errors that occurred in your testing environment during a test run. The recovery scenario manager provides a wizard that guides you through the defining recovery scenario.

The recovery scenario has three steps:

  • Triggered Events
  • Recovery steps
  • Post-Recovery Test-Run

Q #60) What is the use of Text output value in QTP?

Answer: Output values enable you to view the values that the application talks about during runtime. When parameterized, the values change for each iteration. Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.

Q #61) How to use the Object Spy in QTP 8.0 version?

Answer: There are two ways to Spy the objects in QTP:

  • Thru file toolbar: In the File ToolBar, click on the last toolbar button (an icon showing a person with a hat).
  • Thru ObjectRepository Dialog: In the Object Repository dialog click on the button “object spy…” In the Object, spy Dialog click on the button showing the hand symbol. The pointer now changes into a hand symbol and we have to point out the object to spy the state of the object. If at all the object is not visible or the window is minimized then hold the Ctrl button and activate the required window and release the Ctrl button.

Q #62) What is the file extension of the code file and object repository file in QTP?

Answer:

File extension of

  • Per test object rep: filename.mtr
  • Shared Object rep: filename.tsr
  • Code file extension id: script.mts

Q #63) Explain the concept of object repository and how QTP recognizes objects.

Answer:

Object Repository: It displays a tree of all objects in the current component or in the current action or entire test( depending on the object repository mode you selected). We can view or modify the test object description of any test object in the repository or add new objects to the repository.

QuickTest learns the default property values and determines in which test object class it fits. If this is not enough, it adds assistive properties, one by one, to the description until it has compiled a unique description.

If no assistive properties are available, then it adds a special Ordinal identifier such as the object’s location on the page or in the source code.

Q #64) What are the properties that you would use for identifying a browser and page when using descriptive programming?

Answer: “name” would be another property apart from the “title” that we can use. OR We can also use the property “micClass”.

For Example, Browser(“micClass:=browser”).page(“micClass:=page”)

Q #65) What are the different scripting languages that you could use while working with QTP?

Answer: You can write scripts using the following languages:

Visual Basic (VB), XML, JavaScript, Java, and HTML

Q #66) Tell some commonly used Excel VBA functions.

Answer: Common functions include Coloring the cell, Autofit cell, setting navigation from the link in one cell to other saving

Q #67) Explain the keyword createobject with an example.

Answer: Creates and returns a reference to an Automation object
syntax: CreateObject(servername.typename [, location])
Arguments
server-name: Required. Name of the application providing the object.
type name: Required. The type or class of the object to create.
location: Optional. Name of the network server where the object is to be created.

Q #68) Explain the QTP Automation Object Model in brief.

Answer: Essentially all configuration and running functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties.

Although a one-on-one comparison cannot always be made, most dialog boxes in QuickTest have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods.

You can use the objects, methods, and properties exposed by the QuickTest automation object model, along with the standard programming elements such as loops and conditional statements to design your program.

Q #69) How to handle dynamic objects in QTP?

Answer: QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run-time object properties.

QTP may fail to recognize the dynamic objects whose properties change during run time. Hence there is an option to enable Smart Identification, wherein it can identify the objects even if their properties change during run time.

Check this out:
If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description and uses the Smart Identification mechanism to try to identify the object.

While the Smart Identification mechanism is more complex and more flexible, thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails.

The Smart Identification mechanism uses two types of properties:

  • Base filter properties: The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a web link’s tag was changed to any other value, then you could no longer call it the same object.
  • Optional filter properties: Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.

Q #70) What is a Run-Time Data Table? Where can I find and view this table?

Answer: In QTP, there is a data table that is used at runtime.

  • In QTP, select the option View ->Data table.
  • This is basically an excel file, which is stored in the folder of the test created, its name is Default.xls by default.

Q #71) How do Parameterization and Data-Driving relate to each other in QTP?

Answer: To be data-driven, we have to parameterize. i.e., we have to make the constant value as a parameter so that in each interaction(cycle) it takes a value that is supplied in a run-time data table.

Only through parameterization, we can drive a transaction (action) with different sets of data. As you know, running the script with the same set of data several times is not suggested, and it’s also of no use.

Q #72) What is the difference between Call to Action and Copy Action?

Answer: Call to Action: The changes made in Call to Action will be reflected in the original action (from where the script is called). But whereas in Copy Action, the changes made in the script will not affect the original script (Action).

Q #73) Explain the concept of how QTP identifies the object.

Answer: During recording, QTP looks at the object and stores it as a test object.

For each test object, QTP learns a set of default properties called mandatory properties and looks at the rest of the objects to check whether these properties are enough to uniquely identify the object. During the test run, QTP searches for the runtime objects that match with the test object it learned while recording.

Q #74) Differentiate the two Object Repository Types of QTP.

Answer: Object Repository is used to store all the objects in the application being tested.

Types of object repository: Per action and Shared repository.
In the Shared Repository, there is only one centralized repository for all the tests, whereas in Per action, for each test a separate per action repository is created.

Q #75) What are the differences and best practical application of Object Repository?

Answer:

Per Action: For each Action, one Object Repository is created.
Shared: One Object Repository is used by the entire application

Q #76) Explain the difference between Shared Repository and Per Action Repository.

Answer:

Shared Repository: Entire application uses one Object Repository that is similar to the Global GUI Map file in WinRunner.
Per Action: For each Action, one Object Repository is created, like a GUI map file per test in WinRunner.

Q #77) Have you ever written a compiled module? If yes, tell me about some of the functions that you wrote.

Answer: Sample answer (You can talk about the modules you worked on. If your answer is yes then you should expect more questions and should be able to explain those modules in later questions): I Used the functions for Capturing the dynamic data during runtime. The function is used for Capturing the Desktop, browser, and pages.

Q #78) Can you do more than just capture and playback?

Answer: Sample answer (Say yes only if you worked on): I have done dynamically capturing the objects during runtime in which no recording, no playback, and no use of the repository is done at all. This was done through Windows scripting using the DOM (Document Object Model) of windows.

Q #79) How to do the scripting? Are there any inbuilt functions in QTP? What is the difference between them? How do we handle script issues?

Answer: Yes, there’s an inbuilt functionality called “Step Generator” in Insert -> Step -> Step Generator – F7, which will generate the scripts as you enter the appropriate steps.

Q #80) What is the difference between checkpoint and output value?

Answer: An output value is the value captured during the test run and is entered in the run-time but to a specified location.

For Example, Location in Data Table[Global sheet / local sheet]

Q #81) How many types of Actions are there in QTP?

Answer:

There are three kinds of actions:

  • Non-reusable action: An action that can be called only in the test with which it is stored, and can be called only once.
  • Reusable action: An action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.
  • External action: A reusable action is stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for external action.

Q #82) I want to open a Notepad window without recording a test and I do not want to use the System utility Run command as well. How do I do this?

Answer: You can still open the notepad without using the record or System utility script, just by mentioning the path of the notepad “( i.e. where the notepad.exe is stored in the system) in the “Windows Applications Tab” of the “Record and Run Settings window.


Most Popular UFT Interview Questions and Answers

HP UFT Interview Questions

HP UFT (Hewlett Packard – Unified Functional Testing) earlier was called as HP QTP (Hewlett Packard – Quick Test Professional). This tool is used for the Automation Testing of applications or websites.

With the help of this tool, we perform various types of testing like functional testing, regression testing, etc. HP UFT can also be used at an enterprise level for testing purposes. VB (Visual Basic) scripting language is used in UFT, which is a bit easy and a simple language when compared to the other OOP (Object Oriented Programming) languages.

Using HP UFT, a tester can test both the front-end and back-end of the software applications. The front-end testing part is called GUI testing and the back-end testing part is called API (Application Programming Interface).

With this tool, we can test the entire application or a specified part/logic/object of the application.

Note: Using the UFT tool, one can run and test the software web application on remote MAC machines with the help of the Safari browser.

Here we go with the most common interview questions and answers to HP UFT:

Q #1) Which features or drawbacks of QTP lead to the upgrade for a newer version?

Answer:

They include:

  • The main feature of QTP i.e., “testing only GUI” lead to the upgrade for a newer version of the software.
  • QTP contains very big tests, which lead to the consumption of more memory. Due to this, the CPU gets utilized for a longer time and this affects the system’s speed.
  • The results of scripts executed in QTP are saved as HTML files instead of text (.txt) files. With this, the size of the result files or group of files will occupy more system space.

Q #2) How is UFT 11.5 version different from UFT 12.0?

Answer: UFT 11.5 version is a combination of GUI and API, whereas UFT 12.0 is a combination of GUI, API, and BPT (Business Process Testing).

Q #3) Define the Error Pane of UFT.

Answer: While working on scripts like executing, saving, opening the scripts, etc, we may face a few errors. Such errors are listed and displayed in an area known as the “Error Pane”.

The types of errors listed in the Error Pane include:

  • Code syntax errors
  • Missing resources
  • Missing references and property values

Note: Earlier in QTP, Information Pane was used in capturing code syntax errors.

Q #4) Can UFT be connected to the Quality Center? If yes, brief the process or steps.

Answer: Yes, UFT can be connected to QC.

This can be done from the front end or GUI as shown below:

Go to the menu File -> Select ‘Quality Center’, and then you will be prompted to enter the URL of the Quality Center.

After entering the URL it also asks for the login credentials like user id, password, project, etc. Enter the required details and then you will be able to execute the scripts from QC.

Q #5) Is it possible to use two instances of UFT on the same machine? If no, explain why?

Answer: No, we cannot use two instances of UFT on the same machine. However, UFT handles multiple instances of applications that are going to be tested.

We can even work on two different applications on the same machine without stopping the recording of UFT. To do this, you need to modify a few configuration settings for UFT.

You need to select the option “Record and Run on any opened application” from Automation -> Record and Run settings -> select.

For example, UFT can work on multiple windows of the IE browser.

Q #6) What is meant by Output Value in UFT?

Answer: An Output Value step is used to capture the value from any field or value of any object property when the script execution is going on. Such values are stored in the desired location in the data table and can be used as input for the other fields or objects at another point in the test script.

There are four types of output values, which include:

  • Standard Output value
  • Text or Text Area Output Value
  • Database output value and
  • XML output value

Q #7) Define Environment Variable in UFT along with its uses.

Answer: In UFT we use a few global variables to store global data like User Id and Password. Such global variables are termed Environment variables.

There are three types of environment variables in UFT, which include:

  • Built-in (Read-Only)
  • User-defined – Internal (Read-Only)
  • User-defined – External (Read / Write)

Uses of Environment Variables include:

  • With the help of these environment variables, the parameters are defined in the test scripts.
  • These environment variables are used in various tests or actions.
  • We can store links to websites (URLs), testing environment details, etc., in these environment variables.

Q #8) Brief the process of testing with UFT.

Answer: There are seven phases of the testing process using UFT:

#1) Preparing the Plan for Testing: In this phase, you will decide and select the environment, system configuration, etc., used for testing. You will even prioritize the steps that are involved in testing and identifying the test data too. It will also predict the expected output of the scripts.

#2) Capturing the actions performed on the Application: In this phase, you will perform the testing steps or actions on the website/application that is to be tested. Simultaneously, UFT will automatically record and capture the testing activities that are executed in the application.

#3) Boosting the Test Script: This phase will make the test script more attractive by adding extra effects like inserting the checkpoints, parameterization, declaring the output values, etc.

#4) Executing the Test Script again: At this stage, the test script is executed once again in order to check whether the script runs smoothly with the extra additions made in the previous step. If any bugs are detected then they are debugged and fixed.

#5) Actual execution of the test script in the application: Now run the test script to perform the actual execution in this phase.

#6) Examining the test results: After the test execution, the results are analyzed from the test report generated.

#7) Analyzing the defects: If we find any bugs during the execution that leads to the failure of the test script, then the same should be reported in the Defects Report.

Q #9) Suggest and define a solution for an application whose objects are not recognized by UFT.

Answer: If an object is not recognized by UFT then we need to follow a few basic points like verifying whether all the required Add-ins are loaded or not, searching for any UFT patches, etc.

There are 3 stages of solutions to sort out this issue.

  • Tool Level Solution: At this level, we try to use low-level recording mode, the configuration of virtual objects, etc.
  • Organization Level Solution: Try to gather appropriate properties or information about objects that are not recognized by UFT. Generally, development teams will be aware of all the properties of the objects.
  • Vendor Level Solution: Consult the respective vendors regarding this issue and raise a ticket/token for the same.

Q #10) What is the use of running the scripts in Hidden-mode in UFT?

Answer: A user can run the test scripts for UFT in Hidden-mode. Running the test scripts in this mode will improve the execution and its speed. As User intervention is not required during the execution of scripts, this hidden mode can be used easily.

The test results can be viewed by the user after the script execution gets completed. To enable this hidden mode, go to “Remote Agent Setting” and select the option “Run UFT in hidden mode”.

Q #11) What is Cross-browser testing? Does UFT support this?

Answer: Yes, UFT supports testing across various browsers like Chrome, Safari, IE, Firefox, etc.

With this feature, we can record the script on one browser and run the same on another browser without any configuration changes.

Q #12) What is Distributed testing? How does UFT support it?

Answer: Distributed Testing means testing the application on multiple machines, clients, servers, mobiles, etc. UFT supports this distributed testing with a new feature called “Run-time engine”.

Q #13) Describe the differences between functions and actions in UFT.

Answer: The below-mentioned pointers explain how functions are different from actions.

  • Functions are not associated with Object Repository and Data Table whereas Actions maintain their own Object Repository and Data Table.
  • Functions are elements of VB scripting that are not only restricted to UFT whereas Actions are elements of UFT.
  • With the help of functions, the code gets re-used and with actions, the test gets re-used.
  • The common feature between functions and actions is that both are associated with input parameters, output parameters, and return values.
  • A Script can be divided into multiple Actions like Sign In, Sign Out, etc., whereas a Function is created in a script.

Action Example: Entering any value or data in any field or clicking on any button of an application is termed as an Action. (Entering 20 against the age field is termed as an action or clicking on the Submit button is also an action).

Function Example: Any calculation part or formulae behind clicking on any button is termed as a Function. (After clicking on the ADD button, the addition performed at the back-end is done by a function).

Q #14) What are the various types of Actions in UFT?

Answer:Action” means a step or a group of steps used in testing an application. Each script has only one action.

Generally, there are 3 types of actions.

They are:

  • Non- Reusable Action: This action can be called only once by the test in which it is written or saved.
  • Reusable Action: Can call this as many times as required by the test. It is also saved in the test itself.
  • External Action: The name itself, explains that this action is saved in another (external) test. This works in the same way as the reusable action, just with a difference in its location. This external action can be edited as well.

Q #15) What is meant by a Check Point in UFT? Also, explain the applicable Check Points.

Answer: Check Point represents the point where a particular condition or value of an object is verified against some other fixed or recent value. Checkpoints can be inserted at any point in the test script. UFT supports various types of checkpoints.

They include:

  • Standard Checkpoint: This checkpoint is used to verify the object properties of buttons, lists, etc.
  • Image Checkpoint: It checks the properties of images.
  • Bitmap Checkpoint: It checks the particular zooming property of the images.
  • Table Checkpoint: It verifies the details of tables like row height, width, etc.
  • Text Checkpoint: It checks the position of the text at a particular place.
  • Text Area Checkpoint: It checks whether the text is displayed in the specified area or not.
  • Accessibility Checkpoint: It checks the standardization of the websites.
  • Page Checkpoint: It checks the properties of a web page like the number of hyperlinks and images in a webpage, the time taken for loading the page, etc.
  • Database Checkpoint: It is used to check the database values.
  • XML Checkpoint: It is used to verify the information and data related to XML.

Q #16) How is a Bitmap checkpoint different from an Image checkpoint?

Answer: Using “bitmap checkpoint” we can compare the point-to-point positions of the expected and actual output images. This checkpoint works using the pixels of the image area or webpage area.

Whereas the Image checkpoint checks only the properties related to the images like its source file, values, etc.

For the bitmap checkpoint, we do not need a particular image, it checks the screen area whereas the image checkpoint compulsorily needs an image. Using the bitmap checkpoint we can even test a part of an image.

Q #17) Differentiate the type of test cases that can be automated and cannot be automated.

Answer:

Given below are a few:

  • We cannot automate Test Cases that require human interference.
  • The newly designed Test Cases are not automated. They should be executed at least once manually.
  • Tests that need to be executed repeatedly should be automated.
  • Tests that need to be tested with multiple sets of data are automated.
  • Test cases are based on requirements that changes repeatedly cannot be automated.

Q #18) How many types of Automation frameworks are there in UFT? Describe them.

Answer: Automation Framework –  A group of Instructions followed during the scripting or coding is termed as a Framework. These instructions include the format of a datasheet, standards used for coding, etc.

The various Automation frameworks are as follows:

  • Linear Scripting
  • Data-Driven Testing
  • Keyword Driven
  • Hybrid Framework
  • Test Library Architecture

Q #19) Explain how Selenium is different from UFT.

Answer:

Below are a few differences between Selenium and HP UFT:

  • Selenium is an open-source tool whereas UFT is not. Selenium does not require a license to use it, however, UFT does need it.
  • UFT only supports VB Scripting whereas Selenium scripting can be done using JAVA, Perl, .net, PHP, etc.
  • Using UFT we can test web-based, windows based, and mainframe applications. Selenium is only used to test web applications.
  • Testing through UFT is much more expensive than testing with Selenium.
  • UFT scripts are more user-friendly than Selenium Scripts.

Q #20) How is a Step generator used in UFT?

Answer: Step Generator is the most useful and important built-in feature of UFT. It is used to add or create the steps in test scripts without recording. We can even record the disabled objects through the step generator. If we miss any steps during recording, then we can add the same with the help of the Step Generator.

Q #21) Explain the new feature of UFT regarding the export of test results.

Answer: In the earlier versions of QTP, the user manually exported the test results to PDF or HTML formats.

However, this feature is now automated in UFT, such that the test results are automatically exported to HTML or PDF files when small changes are made to the settings.

Go to the menu Tools -> Options -> General tab and select ‘Run sessions’.

Q #22) Which methods are used to handle exceptions or run-time errors in UFT?

Answer: In UFT, we have two methods to handle run-time errors or exceptions.

They are:

  • Create a recovery scenario and include (linking) the same in each test script.
  • By using ‘On Error Resume next’ statement, the execution of the script jumps to the next immediate statement in spite of the exception statement.

Q #23) Can you brief the hurdles you faced during Automation testing?

Answer: General hurdles that every automation tester will face during testing are:

  • A few times the application under test (AUT) will not be available for testing due to some issues.
  • Sometimes the features of the application get changed or modified. This leads to some maintenance issues and causes the testing to be stopped for some duration.
  • The automation test environment of the application may not be available.

Q #24) What are the features supported by UFT?

Answer: Generally UFT supports three kinds of features.

They include:

  • Direct Features: Features that are built-in with a UFT tool window like Data Table, Object Spy, Step generator etc.
  • HP Integrated Tools: These tools can be automatically installed if the UFT is installed. Example: Test Batch Runner, Password Encoder, etc.
  • Other Integrated Tools: If we want to use these tools, then a user needs to install them. Example: VB Script, SQL etc.

Q #25) Define the Canvas view of UFT.

Answer: Canvas is a display panel, which displays the graphical form of actions of the test flow that happens during the testing process. As per our needs, we can change the actions from top to bottom.

Conclusion

We hope, this article will be very useful for those who are preparing to attend the interview on Automation Testing of UFT/QTP.

It is advisable to go through the tool once and experience its look and feel before facing the interviewer. Go through the previous and the latest versions of QTP/UFT, so that you can get a few more ideas on the differences between various versions.

These questions will be useful to prepare for QTP/UFT interview. If you come across any new questions please feel free to post in the comments below. We will try to answer it.

=> Visit Here For The QTP Training Tutorials Series

We wish you all success in your Interview!!!

Was this helpful?

Thanks for your feedback!

Recommended Reading

81 thoughts on “Top 105 QTP Interview Questions and Answers (Latest UFT Interview Questions)”

  1. I have many questions in my mind and shared those using the form. Just had an interview in a top MNC and I’m feeling confident about my answers. Hope your readers will benefit from these questions.

    Reply
  2. Hi Guys,

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at
    lavs.2393@gmail.com

    thanks in advance

    Reply
  3. ‘ @ #8 David
    myStr = “aaaabbbbccc”
    output = “”
    For ii = 1 to len (myStr)

    myChar = mid(myStr,ii,1)
    If Instr(output,myChar) = 0 Then output = output & myChar & UBound(Split(myStr,myChar))
    Next
    msgbox output

    Reply
  4. strXML = “name myname name is murali name”

    Set objRE = New RegExp

    With objRE
    .Pattern = “”
    .IgnoreCase = True
    .Global = False
    End With

    Set objMatch = objRE.Execute( strXML )
    strNewMail = objRE.Replace( strXML, “” )

    Reply
  5. I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at (ssheelvant@yahoo.com) thank you

    Reply
  6. Tech Mahendra QTP interview questions for experienced
    1) have u ever involved in Test planning
    Ans) yes i have involved, Test plan is a document which gives the overall direction to the testing.
    Test plans and their formats vary from company to company.
    It might contain : Test Scope, Test objective ,Assumptions, Risk Analysis ,Test Design, Roles & Responsibilities,
    Schedule & REsources,Test Data Management, Test Enviornment, Communicaton Apporoach, Test Tools.
    _______________________________________________
    _______________________________________________

    2)What is there are only one day time and 100 Test cases then what is ur decision
    ANS) Divide your testcases based on priority-
    -High
    -Medium
    -LowRun
    the high priority test cases first.then the medium and then the low priority ones
    and also Consider testing the areas of the application that are most risky and likely to turn up defects

    3) Automation: reason for choosing QTP as automation tool
    ANS) QTP is much more user-friendly tool which is much
    more adaptable working with Web-based applications and also
    provides an inbuilt Keyword-view enabling easy scripting
    for end user.

    A few distinct advantages QTP offers over WR.

    o QTP is more user friendly and does not expose the
    end user to direct TSL coding. Inexperienced / non-
    technical people can use the keyword view to better
    understand the script.
    o An inbuilt Recovery Mechanism to handle various
    exceptions and application crashes etc.
    o Ability to work in advanced manner with Object
    Repository in terms of Merge Tool, Object Repository
    Comparison, Exporting Local objects etc.
    o Better Support for VB, Java based applications due
    to inbuilt add ins.
    o Easy integration of external function files in
    terms of creating Libraries. Associated using Resources.
    o Ability to spilt a single test into various actions
    making debugging easier and enabling better maintainability.
    o Ability to set up Property Recognition Order and
    Prioritization using Object Identification menu

    4)how many TC’s did u automate, how many test scripts did u write

    5)x=10, y=5 how to swap these 2 without using 3rd variable
    int x = 10, y = 5;
    // Code to swap ‘x’ and ‘y’
    x = x + y; // x now becomes 15
    y = x – y; // y becomes 10
    x = x – y; // x becomes 5

    6)reverse a string strrev function

    ipstring = inputbox(“enter a string”)
    for i = LEN(ipstring) to 1 step-1 /* Length of String
    var = mid(ipstring, i,1) /* mid : we enter start point and range )
    strrev = strrev&var
    next
    msgbox strrev

    Reply
  7. Hi Guys,

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at
    priyac1508@gmail.com

    thanks in advance

    Reply
  8. Hi Guys,

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at vibhorbhatt87@gmail.com.
    Thanks in advance !!

    Reply
  9. I wanted questions related to web enviroment like how do we access a particula browser among the various browsers. How to close a paticular browser on the desktop. and one of the question asked is explain the genenic functions you have developed. Explain your framework

    Reply
  10. Enter with rang like-987654321(if reverse)

    x=inputbox(“Enter any no”)

    a=len(x)
    for i=0 to a-1
    j=left(x,a-i)
    t = t & j & vbnewline
    next

    Msgbox t

    Reply
  11. strXML = “name myname name is murali name”

    Set objRE = New RegExp

    With objRE
    .Pattern = “name”
    .IgnoreCase = True
    .Global = False
    End With

    Set objMatch = objRE.Execute( strXML )
    strXML = objRE.Replace( strXML, “” )

    print strXML

    Reply
  12. Hi Guys,

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at shstharita@gmail.com
    thanks

    Reply
  13. @all: We will make a note of all the questions provided by you all. The answers will come out as part of interview questions part 2 article

    Reply
  14. How to add recovery scenarion to framework, irrespsective of tests i.e without using AOM. To be more clear I dont want to add recovery scenarion to individual tests. If there is a framework then it should handle the hiccups anywhere in the framework.
    Forgot to add my email id swamy.vrushab@gmail.com

    Reply
  15. 3) Does QTP run in any environment?

    Answer: No, QTP works only in the Windows environment.

    Answer is Yes. I can work in both Web and Windows environment

    Reply
  16. The questions that are mention above are very much useful for students like me.Thanks for sharing such article. Even in MindScripts Technology special interview sessions are conducted for students to prepare them for top MNC’s.

    Reply
  17. I have gone through all questions, those are good but surely not common questions. Here are some advanced questions.

    1. If an Object is not able to identify by QTP then how you will handle it? (Extensibility, Virtual Object, SendKeys)

    2. Browser.Sync is giving false results? Do you agree with this? If yes, what is the work around?

    3. QTP’s .Exist is returning False even though object is exist. What could be the reason?

    4. Is it possible to update Shared OR during Runtime? If yes, how?

    5. What is the difference between FireEvent and ReplayType 2?

    6. Index/Location/CreationTime and XPATH, which is efficient mechanism to identify an object?

    7. How to stop QTP Test Script execution during runtime?

    I can add more and just FYI… for all above questions there are multiple counter questions so be careful while answering them. All the best.

    Reply
  18. I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn scripting. Please show me the path where to start with. Plese share If any one having any website link where i can learn the basic scripting.

    Reply
  19. How to add recovery scenarion to framework, irrespsective of tests i.e without using AOM. To be more clear I dont want to add recovery scenarion to individual tests. If there is a framework then it should handle the hiccups anywhere in the framework.

    Reply
  20. @ David

    ‘inputstring=”aaaabbbccc”
    ‘output=a4b3c3
    input_string=”aaaabbbccc”
    For i = 1 To len(input_string) Step 1
    If input_string=”” Then
    Exit For
    End If
    chr_String=left(input_string,1)
    before=len(input_string)
    input_string=Replace(input_string,chr_String,””)
    after=len(input_string)
    Display_Str=Display_Str&chr_String&before-after
    Next
    msgbox display_Str

    Reply
  21. Set objFSO = CreateObject(“Scripting.FileSystemObject”)
    Set objXML = CreateObject(“Msxml2.DOMDocument”)
    Set objInputFile = objFSO.OpenTextFile(“D:\CA-Nevada-Tax-Freeform-Situs-Blank.xml”,1,False,-2)
    Set objOutputFile = objFSO.CreateTextFile(“D:\CA-Nevada-Tax-Freeform-Situs-Blank1.xml”,True,False)
    strXML = objInputFile.ReadAll
    strXML = Replace(strXML,””,”“)
    strXML = Replace(strXML,””,” “)
    objOutputFile.Write strXML
    objInputFile.Close
    objOutputFile.Close

    Reply
  22. Hi,

    Is java script uses in QTP.
    Need clear answer as people are saying in other articles yes or No.
    If yes means how to implement java script in QTP.

    Reply
  23. Hi Guys,

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at shivarenjini89@gmail.com
    Thanks in advance !!

    Reply
  24. @#8 david on 05.13.13 at 10:30 am
    set d=createobject(“scripting.Dictionary”)
    str=”aaaabbbccc”
    for i=1 to len(str)
    c=mid(str,i,1)
    d(c)=d(c)+1
    next
    for each k in d
    temp=temp& k&d(k)
    next
    msgbox temp

    Reply
  25. @David,

    inputstring=”aaaabbbbccc”

    For i = 1 to len(inputstring)
    Set RegEx =New RegExp
    Str = Left(inputstring,1)
    RegEx.Pattern = Left(inputstring,1)
    RegEx.IgnoreCase = True
    RegEx.Global = True
    If len(inputstring) = 0 Then
    Exit For
    End If
    Before = len(inputstring)
    inputstring= RegEx.Replace(inputstring,””)
    After = len(inputstring)
    StrDisplay = StrDisplay & Str & (Before-After)

    Next

    Print StrDisplay

    Reply
  26. I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at
    anandvelu.k@gmail.com Thank you….

    Reply
  27. Hi Guys,

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at
    d.manasi0612@gmail.com

    Reply
  28. @mns: we can convert the string in uppercase without using UCase method. by using conversion of AsCII to character and Character to Ascii method so based on that we can convert the string for Upper case

    Reply
  29. Hi All,

    in script we have 100 lines of code.I have to replace one string (eg : subbu) with other one (eg : test) .How can i replace that one using AOM ?

    If you have the answer please reply to my mentioned mail ID

    Thnaks in advance.

    Reply
  30. There is an excel sheet where 1st column is the name of application and second column is the list of URL of all the application. I want a FOR Loop so that each time the IE opens with the new URL and after closing the old IE.

    Reply
  31. I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at

    Reply
  32. hi Sir,
    here 3) Does QTP run in any environment?
    No, QTP works only in the windows environment.
    you have mention wrong ans bcz it run both environment .

    Reply
  33. Good concepts.. but these are the basic ones. Please provide some more advance side of qtp, like why to choose qtp over manual or other tools, how to run scripts in qtp, folder structure for frameworks…

    Reply
  34. hello

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at
    nehakashyap12aug@gmail.com

    thanks

    Reply
  35. filepath=”C:\CA-Nevada-Tax-APN-Freeform.xml”
    xpathlist=”//tax_param//freeform|//tax_param//tax_qualifier”
    newvaluelist=”murali|uppi”
    Function updatexmlnodevalue(xmlpath,xpath,newvalue)
    ‘crete objpect for XML
    Set xmlDoc = CreateObject(“Microsoft.XMLDOM”)
    Set fso=createobject(“scripting.filesystemobject”)
    If fso.FileExists(filepath)true Then
    ‘reporter.ReportEvent micFail,”specified file does not exist” ,” ”
    Exit Function
    else
    ‘load xmlfile
    xmlDoc.load(xmlpath)
    ‘Locate the desired node

    xpatharray=split(xpathlist,”|”)
    newvaluearray=split(newvaluelist,”|”)

    For i=0 to ubound(xpatharray)
    xpath=xpatharray(i)
    Set nNode = xmlDoc.selectsinglenode (xpath)
    If nNode is Nothing Then
    ‘reporter.ReportEvent micFail,”specified xpath does not exist in xml file” ,” specify correct xpath ”
    Exit Function
    End If
    ‘Set the required value
    nNode.text = newvaluearray(i)
    ‘reporter.ReportEvent micPass,”value of the Node is changed” ,” New value is set ”
    ‘Save the xml document with the new settings.
    Next
    xmldoc.save(“C:\test\CA-Nevada-Tax-APN-Freeform.xml”)
    end if
    End Function

    Call updatexmlnodevalue(filepath,xpathlist,newvaluelist)

    Reply
  36. Hi Guys,

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at
    kavitafortuneinfoserve@gmail.com

    thanks in advance

    Reply
  37. How to add recovery scenarion to framework, irrespsective of tests i.e without using AOM. To be more clear I dont want to add recovery scenarion to individual tests. If there is a framework then it should handle the hiccups anywhere in the framework.
    .Sorry forgot to give my Id ( swamy.vrushab@gmail.com)

    Reply
  38. hello

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at
    vinodv496@gmail.com

    Reply
  39. I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at
    ssheelvant@yahoo.com

    Reply
  40. @sada

    If it is possible, can u pls share the code for changing a string to upper case without using Ucase builtin string function in vb script

    Reply
  41. filepath –>c:\filename.xml

    attributelist –> state_flips|country_flips|country

    newvaluelist ..> 100|1000|10000

    newfilepath –> c:\test\filename.xml

    xpathlist –>//request|//request|//request

    Reply
  42. Why QTP? what is best in QTP that other tools don’t have? I mean why so many companies are preferring QTP over other tools? What makes it the choice of tool for these companies?

    Reply
  43. x = “aaaabbbbccc”
    cta = 0
    ctb = 0
    ctc = 0
    ctd = 0

    For i = 1 To Len(x)
    y = Right(Left(x, i), 1)
    Select Case y
    Case “a”
    cta = cta + 1
    Case “b”
    ctb = ctb + 1
    Case “c”
    ctc = ctc + 1
    Case “d”
    ctd = ctd + 1
    End Select
    Next

    MsgBox “a” & cta & “b” & ctb & “c” & ctc & “d” & ctd

    Reply
  44. I would like to submit software testing notes kindly oblige and guide us in the following matter
    yours sincerly
    vasudha

    Reply
  45. Hi Guys,

    I am a beginner to QTP & VB scripting. Please help me out as i am very much keen to learn to do scripting in my project. But i am not able to find way where to start with. If any one having any website link where i can learn the basic scripting.
    Kindly email me any stuff you guys have at roopanjali@gmail.com
    thanks

    Reply
  46. a=12345

    for i=1 to len(a)
    d=right(a,i)
    temp = temp&vbnewline&d

    next
    msgbox strreverse(temp)

    output:
    54321
    5432
    543
    54
    5

    Reply

Leave a Comment