InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
I successfully developed and executed a script, which I then saved to QC. When I tried to run the script from within QC, it didn't work. What could be the reasons? |
|
Answer» The FOLLOWING points should be considered while checking for the reason for the failure of the script within QC:
In this article, we have covered the most frequently asked interview questions on UFT. If you're writing code in an interview, don't FORGET to provide comments. Demonstrate good programming techniques. Before going to a QTP interview, MAKE sure you know what version of QTP you're using, what add-ins you're using, what versions of other software you're using, and so on. It will take a couple of HOURS to re-familiarize yourself with QTP if you haven't used it in a while but have prior familiarity. Useful Resources:
|
|
| 2. |
What do you understand about Object Spy in the context of UFT? |
|
Answer» Object Spy is a FEATURE in UFT that allows you to SEE the properties and METHODS of both test and run-time objects. It also contains the syntax for a particular method. Object Spy displays the entire hierarchy of the object you've chosen. Object Spy is a TOOL that allows you to add objects to the Object Repository in QTP. The TOOLBAR, as seen below, can be used to access Object Spy. |
|
| 3. |
What are the various methods for launching an application in UFT? |
|
Answer» Following are the different methods of launching an application:
Following is the SYNTAX for USING SystemUtil.Run SystemUtil.Run ( FileName, Parameters, Path, Operation )Example: SystemUtil.Run("chrome.exe",http://www.google.com)SystemUtil.Run("test.txt", "","C:\","1")
We can also use the InvokeApplication COMMAND for launching an application. InvokeApplication "C:\Program Files\Google Chrome\CHROME.EXE http://www.google.com"
Example: We create a “WScript.shell” object. Dim testshellSet testshell= CreateObject ("Wscript.shell")testshell.run "%windir%\paint" |
|
| 4. |
What do you understand about the Expert view and Keyword view in the context of UFT? |
|
Answer» EXPERT view: Each line in the Expert View represents a VB Script Test Step. Consider the code below. Dialog("Login").WinEdit("Site Name:").Set "InterviewBit"Following the Object Type, the name of an object is shown in parenthesis. Login is the object name, and Dialog is the object type. A "dot" separates objects in an Object HIERARCHY. The Object Hierarchy of Dialog and WinEdit is the same in this case. To PUT things in context, Object Hierarchy is an Object Oriented Concept that refers to a collection of items that are linked in a parent-child connection. In our situation, the Parent Object is Dialog Box, and the Child Object is WinEdit. At the end of the statement, the operation done on the object is always printed, followed by any values associated with the operation. Using the Set METHOD, the term "InterviewBit" is placed in the Site Name Edit Box. The GUI object on which the operation is done, along with its WHOLE hierarchy, is the syntax for a statement in expert view, followed by the Operation on the Object and the value associated with that Operation. This is shown as below: ParentObject(Name).ChildObject1(Name)...ChildObjectN(Name).OperationKeyword view: The Keyword View is a table-like view in which each step is represented by a single row in the table and each column by different sections of the steps.
|
|
| 5. |
What do you understand about virtual objects in the context of UFT? What are the limitations of the virtual objects in UFT? |
|
Answer» Standard WINDOW objects may be present in an application under test, but UFT may not recognise them. In certain cases, objects of the type button, link, or other can be declared as virtual objects (VO) so that user actions can be mimicked on the virtual objects during execution. For example: Let's pretend we're automating a Microsoft Word scenario. We open the MS Word application and click on any of the ribbon icons. For example, on the Ribbon, the user selects the Insert tab, then selects the "PICTURE" button. Here, a button is recognised as a WinObject, emphasising the RELEVANCE of virtual objects. Following are the limitations of virtual objects in UFT:
|
|
| 6. |
Differentiate between UFT and Selenium. |
||||||||||||||||||||||||||||
Answer»
The following table lists the differences between UFT and Selenium:
|
|||||||||||||||||||||||||||||
| 7. |
What are the different types of object repositories available in UFT? |
|
Answer» Following are the different types of object repositories available in UFT:
|
|
| 8. |
What do you understand about object repositories in the context of UFT? Explain how object identification works in UFT. |
|
Answer» UFT recognises an Object Repository as a collection of Test Objects and information for working on it. By default, when a user records a test, the objects and their properties are recorded. UFT will not be able to playback scripts until it UNDERSTANDS objects and their properties.
|
|
| 9. |
What are the different types of recording modes available in UFT? Is it possible to change between Recording modes while creating a Test? |
|
Answer» Following are the different types of recording modes available in UFT:
Yes, we can switch to Analog/Low-level mode in the middle of a recording, accomplish the task at hand, and then return to conventional recording. The Analog mode switch is only available when recording, not while editing. |
|