1. What are the different tabs in QC?
* Releases
* Requirements
* BPT
* Test Plan
* Test Lab
* Defects
2. What frame work you are using?
Sol: Business Process Testing.
3. How you plan for automation testing?
Sol:
a. Proof of Concept
b. Requirement Analysis and Automation Planning
c. Automation Preparation (Selecting the Areas to Automate)
d. Framework Design and Development
e. Test Automation Development
f. Test Execution and Reporting
g. Maintenance Phase.
Test plan is decided by the test lead in that he decides, what to do (which module has to be tested) how to do (which test has to be done) when to do (date and time) who to do (the name of test engineer who is going to do the testing on that allotted module).
4. Types of repositories?
Sol: Per Action file extension is .mtr, and Shared Repository File Extension is .tsr.
5. Can u associate both repositories with action?
Sol: Yes we can associate.
6. What is Object?
Sol: Objects are the fields and buttons, objects in Application where we use to perform operations.
7. What is Physical description of an Object?
Sol: Physical descriptions are property’s which will uniquely identify an object in an application.
8. How QTP recognize objects?
Sol: Quick Test stores the definitions for application objects in a file called the Object Repository. As you record your test, Quick Test will add an entry for each item you interact with. Each Object Repository entry will be identified by a logical name (determined automatically by Quick Test), and will contain a set of properties (type, name, etc) that uniquely identify each object. Each line in the Quick Test script will contain a reference to the object that you interacted with, a call to the appropriate method (set, click, check) and any parameters for that method (such as the value for a call to the set method). The references to objects in the script will all be identified by the logical name, rather than any physical, descriptive properties.
9. How to get data from cell? How we iterate table?
Sol: We will use Getcelldata to get the data from the cell.
10. If page contain 15 same type of object how u will recognize?
Sol: Using Index Values.
11. What is repository manager?
Sol: You can use the Object Repository Manager to manage all of the shared object repositories in your organization from one central location. This includes adding and defining objects, modifying objects and their descriptions, Parameterizing test object property values, maintaining and organizing repositories, and importing and exporting repositories in XML format.
12. What is recovery?
Sol: While executing your scripts you may get some UNEXPECTED/UNPREDICTABLE errors. (Like printer out of paper). To “recover” the test (and continue running) from these unexpected errors you use Recovery Scenarios.
Recovery scenario manager is used to handle exceptions in run time, three steps to handle exceptions.
1. Trigger event: – Pop-up window, object state, Test run error and Application crash.
2. Recovery operations:-Select an operation to perform when the trigger event occurs they are 1. Keyboard or mouse operation 2.Close application process 3. Function call 4. Restart Microsoft windows.
3. Post recovery: – Select the last run operation you want to perform when the recovery operation is completed.
13. What versions of QTP you used?
Sol: I have used QTP 9.2.
14. What are the differences between QTP 8.2 and QTP 9.2?
Sol:
Mercury Screen Recorder
Dynamic Management of Object Repositories
Object Repository Manager
Object Repository Merge Tool
Multiple Object Repositories per Action or Component
XML Object Repository Format
Function Library Editor
Handling Missing Actions and Resources.
15. What is the need of framework when the Bpt itself a keyword driven framework?
Sol: We have tailored the Framework with minor changes to suit our requirement, we have not used Object Repository, instead we have used Text file where we have defined the objects and User Defined functions, Basically BPT is two layered Framework, we have made it three, the third layer is User Defined functions.
16. Tell me the applications which best suited for keyword driven, data driven, and hybrid framework?
Sol:
Keyword Driven= ATM.
Data Driven= Search Engines and Report based applications.
Hybrid=Mail applications.
17. Which type of object repositories you use for any project?
Sol. Shared.
18. What is the difference between Action and Function?
Sol:
1. Action is Application specific while function is Application independent
2. Action can return multiple values while function returns one value
3. Usually Action used where the object repository is required while function is used where Object repository is not required.
19. What is the difference between function and sub procedure?
Sol:
A sub procedure is a series of VBScript statements, enclosed by Sub and End Sub statements which perform actions but do not return a value. A sub procedure can take arguments. If a sub procedure doesn’t receive any arguments, its Sub statement must include an empty parenthesis().
Sub ConvertTemp()
temp = InputBox(“Please enter the temperature in degrees F.”, 1)
MsgBox “The temperature is ” & Celsius(temp) & ” degrees C.”
End Sub
A Function Procedure is a series of VBScript statements enclosed by the Function and End Function statements. A function procedure is similar to a sub procedure but it can return value to the calling function. A function procedure can take arguments (constants, variables or expressions that are passed to it by a calling procedure). If a function procedure has no arguments, it Function statement must include an empty set of parenthesis. A function returns a value by assigning a value to its name in one or more statements of the procedure. Since VBScript has only one base data type, a function always returns a variant.
20. What you consider while designing automation framework?
Sol: The main factors which should be considered while designing framework is
Architecture of the tool
Architecture of the AUT (Web/Client Server).
Time span
Requirements of the client.
Based on the above I will design the framework.
a) Application functional flow
b) Reusability of the functions
c) Repository types (OR for a Module or OR for the whole Application).
d) Settings in the Tool (Test Settings, Options, Object Identification, Run Settings, Record Settings).
e) Recovery And Exception Handling
f) Global data
g) Parameterization
h) Naming Conventions
i) Directory Structure
j) Scripting Guidelines
21. What is the most challenging work done in QTP?
Sol: ------------------------------------------------------------
22. Tell me one User defined Function you have written?
Sol: ---------------------------------------------------------------
23. Write the script for retrieve the number of rows in a Web table?
Sol: intRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
Messagebox intRowCount
24. Write the script to retrieve the enablity of the web radio group?
Sol: Browser (“Browser”).Page(“Page”).webradiobutton(search).GetROproperty (Enable).
25. How do you handle the exceptions from script in Applications?
Sol: With the Help of Recovery Scenario
Build in functions like Exists, wait, wait property.
26. What is BPT?
Sol: With BPT add-in one can create re-usable component. It’s very similar to re-usable action in terminology. But it is very user friendly and non-technical person can create automated scripts from Business Components in Quality Center.
27. What is the difference between Keyword and Hybrid Framework?
Sol: Keyword driven is basically on the specific keyword from the application,
Data Driven is used to do the Parameterization, inputting the values.
Hybrid is a combination of Keyword driven and Data Driven.
28. What is the version of .net framework used in QTP?
Sol: .net framework version 2.0.
29. What is Driver Script?
Sol:
Driver script is the script which drives the entire test based on actions performed on the objects.
30. What is a checkpoint?
Sol: Checkpoints compare the Actual results with the Expected results.
31. What are the different types of checkpoints in QTP?
Sol: Standard Checkpoint, Bitmap, Text area, Text, Database, xml, table, Accessibility.
32. What does Automation Test Plan Contains?
Scope and Approach of the Test Aut
Requirements (Good candidates and bad candidates for testing)
Automation Implementation
Test Management
Test Design Phase
Test Implementation Phase
Test Execution Phase
Test Environment Requirements
Organizational Structure
Roles and Responsibilities
Project Estimates
Risks and Mitigations
33. How do you call an Action and Function?
Sol: Call Function name, RunAction Action name.
34. How Does Run time data (Parameterization) is handled in QTP?
You can then enter test data into the Data Table; Data can be typed in or imported from Databases, spreadsheets, or text files.
35. What is keyword view and Expert view in QTP?
Quick Test’s Keyword Driven approach, test automation experts Have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View Expert view for advanced users.
36. What is the use of Text output value in QTP?
Output values enable to view the values that the application talks during run time. 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.
37. Explain QTP testing process?
Quick Test testing process consists of 6 main phases Plan, record, modify, debug, execute, analyze.
38. How does QTP recognize Objects in AUT?
Quick Test stores the definitions for application objects in a file called the Object Repository. As you record your test, Quick Test will add an entry for each item you interact with. Each Object Repository entry will be identified by a logical name (determined automatically by Quick Test), and will contain a set of properties (type, name, etc) that uniquely identify each object.
39. What are the types of Object Repositories in QTP?
Shared and Local
40. Explain the check points in QTP?
A checkpoint verifies that expected information is displayed in an Application while the test is running.
41. How does QTP identify objects in the application?
QTP identifies the object in the application by Logical Name and Class.
42. What is Parameterizing Tests?
When you test your application, you may want to check how it performs the same operations with multiple sets of data.
43. What is test object model in QTP?
The test object model is a large set of object types or classes that Quick Test uses to represent the objects in your application.
44. What is Object Spy in QTP?
Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object.
45. Can u test a website or a web application manually without using any automation tool?
Manual is concerned we can test Usability, Functionality, Security testing but whereas
performance is concerned we can’t do it manually accurate.
46. At what stage in the SDLC testing should be started?
Testing Starts from the starting sate of SDLC that is requirement stage where we prepare SRS or URS DOC.
47. STUBS and DRIVERS how did u use these in u r project
Stub: activity of missing components. (Missing Sub modules)
Driver: passes test cases to another piece of code. (Missing main modules)
48. Can you write test cases of design phase?
Yes we can write test cases at the design phase.
49. You have one string abc$sderd$. write a programe to remove the special characters.
‘Remove all non numeric characters
theString= “This*&(*&^%is The&^%&^%><.,.,.,’;’;’; String”
Msgbox “Before – ” & theString & vbcr & “After – ” & CleanTheString(theString)
Function CleanTheString(theString)
‘Msgbox thestring
strAlphaNumeric = “0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”‘Used to check for numeric characters.
For i = 1 to len(theString)
strChar = mid(theString,i,1)
If instr(strAlphaNumeric, strChar) Then
CleanedString = CleanedString & strChar
End If
Next
‘Msgbox cleanedstring
50. Difference between TO and RO properties.
GetTOProperty is used to set the Properties of the Objects which are stored in Object Repository.
GetROProperty is used to get the Properties of the Object from Run time.
51. Different ways of doing DP
Programmatic Description
set Objects (Creating your own Objects).
52. What is agile methodology, and what is the difference between others methodologies.
The Main motto of Agile methodology is adopt the change and plan and implement accordingly when ever the client requirement changes, in Agile methodology Changes in requirements can be injected at any time.
In other methodology’s it is very difficult to implement changes quickly as Agile.
53. What are the different methods for working in Webtable?
The following are the Webtable methods: GetRowCount, GetColumnCount, GetCelldata,
Check, Childitem, Childitemcount, Drop, Drag, Click Capture bitmap, GetROProperty, GetRowwithCelltext, GetTOProperty, SetTOProperty, submit, Tosting, Waitproperty.
54. What is Environment variables?
Environment variable Environment variables in QTP are like global variables in other programming languages which can be accessed through any part of the script. The values of these variables remains same irrespective of the number of iterations (unless you change them through scripting). These variables can prove to be very useful when you want a variable to be shared across various reusable actions.
There are two types of Environment variables, 1. Built in 2. User Defined.
Dim MyValue
MyValue=Environment.Value(“OS”)
Msgbox MyValue
Tip: Environment parameters are especially useful for localization testing, when you want to test an application where the user interface strings change, depending on the selected language. Environment parameters can be used for testing the same application on different browsers.
55. Write a function to reverse a string?
Dim MyStr
MyStr = StrReverse(“VBScript”) ‘ MyStr contains “tpircSBV”.
56. Name 10 Built in Functions in VB?
Split, StrComp, String, StrReverse, LTrim, RTrim, Trim, ScriptEngine, Call Function, Sub.
57. What is the use of Split function?
To split the given string
Dim MyString, MyArray, Msg
MyString = “VBScriptXisXfun!”
MyArray = Split(MyString, “x”, -1, 1)
‘ MyArray(0) contains “VBScript”.
‘ MyArray(1) contains “is”.
‘ MyArray(2) contains “fun!”.
Msg = MyArray(0) & ” ” & MyArray(1)
Msg = Msg & ” ” & MyArray(2)
MsgBox Msg
58. Why OK and OK-2 are there in Object Repository?
If there is a change in height of the Ok button then Qtp will recognize the button as Ok-2
58. How many ways we can parameterize data in QTP?
There are four types of parameters:
Test, action or component parameters enable you to use values passed
from your test or component, or values from other actions in your test.
Data Table parameters enable you to create a data-driven test (or action)
that runs several times using the data you supply. In each repetition, or
iteration, Quicktest uses a different value from the Data Table.
Environment variable parameters enable you to use variable values from
other sources during the run session. These may be values you supply, or
values that Quicktest generates for you based on conditions and options
you choose.
Syntax: Dim MyValue
MyValue=Environment.Value(“OS”)
Msgbox MyValue
To define them: Environment.Value(”name”)= “Narsingrao”
Random number parameters enable you to insert random numbers as
values in your test or component. For example, to check how your
application handles small and large ticket orders, you can have QuickTest
generate a random number and insert it in a number of tickets edit field.
59. How do you connect to database using vbscript?
Dim objConnection, objRecordset, strSearchCriteria
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
Set objConnection = CreateObject(“ADODB.Connection”)
Set objRecordset = CreateObject(“ADODB.Recordset”)
objConnection.Open “DSN=;UID=;PWD=;SERVER=;”
MsgBox “Connected”
objRecordset.Open “SELECT * FROM USER where username = ‘Ravi’” , objConnection, adOpenStatic, adLockOptimistic
If objRecordset.EOF Then
Wscript.Echo “Record cannot be found.”
Else
Wscript.Echo “Record found.”
Wscript.Echo “User ID is “&objRecordset(“USEREID”)
Wscript.Echo “User Name is ” &objRecordset(“USERENAME”)
End If
objRecordset.Close
objConnection.Close
60. How many times the script will iterate when in Local sheet contains 5 rows and Global sheet contains 10 rows? What is the default setting?
First it will iterate using the Local sheet data for 5 times and it will take the 5th row data and iterate for 10 times. So total 10 times it will iterate, because it will use the data in Global sheet.
By Default it considers the Global sheet data.
If the data is like Local 3 and Global 2 in this case qtp will take the data from local first and iterate for 3 times and the last row from local sheet will iterate for two times matching the count of Global sheet rows.
61. What does the Option Explicit do?
By Declaring an Option Explicit in the beginning, it will remove the redundancy of duplicate variables, it will not allow you to declare a variable any where in the script, because vbscript you can declare a variable any where. Using Option explicit it will make you declare a variable using dim. And it will check the spelling mistake if you do in the scripts while using the variables.
62. If I want a function to return multiple values what to do?
It is possible using an array.
63. How will you split the Phone number containing 10 digits in 2, 3 and 5 for phone number field for nation code, area code and Phone number?
Using Left Mid and Right functions we can split the sting.
For Ex: Dim MyVar
MyVar = right(“VB Script is fun!”, 4) ‘ MyVar contains “Script”.
msgbox MyVar
63. What is the extension for Function Library files?
The file extension for Library files is .qfl.
64. In which situation descriptive programming will be used?
Below is some of the situation when Descriptive Programming can be considered useful:
1) The objects in the application are dynamic in nature and need special handling to identify the object. The best example would be of clicking a link which changes according to the user of the application, Ex. “Logout <>”.
2) When object repository is getting huge due to the no. of objects being added. If the size of Object repository increases too much then it decrease the performance of QTP while recognizing an object.
3) When you don’t want to use object repository? Consider the following scenario which would help understand why not repository objects.
Scenario 1: Suppose we have a web application that has not been developed yet. Now QTP for recording the script and adding the objects to repository needs the application to be up, that would mean waiting for the application to be deployed before we can start of with making QTP scripts. But if we know the descriptions of the objects that will be created then we can still start off with the script writing for testing.
Scenario 2: Suppose an application has 3 navigation buttons on each and every page. Let the buttons be “Cancel”, “Back” and “Next”. Now recording action on these buttons would add 3 objects per page in the repository. For a 10 page flow this would mean 30 objects which could have been represented just by using 3 objects. So instead of adding these 30 objects to the repository we can just write 3 descriptions for the object and use it on any page.
4) Modification to a test case is needed but the Object repository for the same is Read only or in shared mode i.e. changes may affect other scripts as well.
5) When you want to take action on similar type of object i.e. suppose we have 20 text boxes on the page and there names are in the form txt_1, txt_2, txt_3 and so on. Now adding all 20 the Object repository would not be a good programming approach.
65. How can you find the number of checkboxes in a webpage?
i) Create a description object for the web check box
Dim objChkDesc, allCheckboxes
Set objChkDesc=Description.Create
objChkDesc (“html tag”).value=”INPUT”
ObjChkDesc (“type”).Value=”Webcheckbox”
ii) Retrieve the child objects
Set allCheckboxes = Browser(“Browser”).Page(“Page”).Child Objects(objChkDesc)
iii) Count the Check boxes
CountCheckbox=allCheckboxes.Count
Msgbox CountCheckbox
iv) Clear the Objects
ObjChkDesc = Nothing
allCheckboxes = Nothing
66. How can you select the check box present in a web table second column and last but one row? Web table rows changes dynamically?
1. Count the number of web table rows
intRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
2. Select the check box in cell of [“intRowcount-1”, 2].
Browser(“Browser”).Page(“Page”).Webtable(“Table”).ChildItem(intRowcount-1,2, WebCheckBox”,0).Set “ON”
67. How can you write the given text to a notepad and save it in the specified location?
We can do to by two ways
1) By using the QTP descriptive programming
strPath =”C:\type.txt”
SystemUtil.Run strpath, ’’ ”, ’’ ”, ’’ ”
Window (“Text:=type.txt – Notepad”).Type “happy”
Window (“Text:=type.txt – Notepad”).Type micAltDwn
Window (“Text:=type.txt – Notepad”).Type micLShiftDwn
Window (“Text:=type.txt – Notepad”).Close
2) By Using File system object of VB Script
Dim objFSO, objTextFile
StrPath = “C:\type.txt”
Set objFSO = CreateObject (“Scripting.FileSystemObject”)
Set objTextFile = objFSO.CreateTextFile (strpath, True)
objTextFile.WriteLine (“happy”)
objTextFile.Close
Set objFSO = Nothing
SetTextFile = Nothing
68. How can you click on the specified subject (Ex: Test Mail) link in a mail box?
1) Count the number of web table rows
IntRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
2) Find the column where Column name is “Subject” in the first row
intColCount = Broswer(“Browser”).Page(“Page”).Webtable(“Table”).GetColumnCount(1)
For i=1 to intoColCount
StrHeader = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetCelldata (1,i)
If trim(lcase(strHeader)) = “subject” Then
intColNumber = i
Exit for
End If
Next
3) Find the Row where Subject is “Test Mail”
For j=1 to intRowCount
strSubject=Browser(“Broswer”).Page(“Page”).Webtable(“Table”).GetCelldata(j, intColNumber)
If strSubject = “Test Mail” Then
intRowNumber = j
Exit For
End If
Next
4) Click on the Link
Browser(“Browser”).Page(“Page”).Webtable(“Table”).ChildItem(intRowNumber, intColNumber, “Link”,0)
69. How can you click on the second link in a Webtable cell? (The cell is having more than one link)
For Ex: Consider Row number 2, Column number 3
Borwser(“Browser”).Page(“Page”).Webtable(“Table”).ChildItem(2,3, “Link”,1)
In this the last number “1” denotes the index number, the index number always starts from “0” (for nth link, n-1)
70. How you write results to the Excel sheet ?
Test results will be written to the Excel sheet at the end of the Test execution by calling the Function
fnWritetoExcelSheet(strPath, intSheetno, intRow, IntCol, strResult)
The function will use the COM API for accessing the Excel and write and save the result.
The function will for this is
Function fnWritetoExcelSheet(strPath, intSheetNo, intRow, IntCol, strResult)
Dim objExcel, objWorkbook
Set objExcel = CreateObject(“Excel.Application”)
Set objWorkBook = objExcel.Workbooks.Open(strPath)
Set objWorkSheet = objWorkBook. WorkSheets(intSheetNo)
objWorkSheet.Rows(iRow).Columns(iColNum).Value = strResult
End Function
71. For a search, results are shown in a web table format. Depend upon the search information the number of records will vary. The web table will display contents slowly row by row when records are huge, how to confirm all the records are loaded and click last row?
1. Count the number of web table rows initial display
revRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
2. Count the number of rows after regular intervals
Do
intRowcount = revRowCount
Wait (20)
‘Wait for 20 sec or depend upon the interval of Each record loading time
revRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
While (intRowCount=revRowcount)
3. Click on link in last row first column
72. What is the difference between Action and Function?
a. Action is Application specific while function is Application independent
b. Action can return multiple values while function returns one value
c. Usually Action used where the object repository is required while function is used where Object repository is not required.
73. What is the difference between Function and Sub routine?
Function Returns one value while Sub routine doesn’t return any value
74. Can we use the function defined in the external DLLs?
We can use the external DLLs using Extern.declare() method – Refer QTP help for further study.
75. How can you know that you are in the home page using QTP?
Scenario – 1
Initially we have to save the home page URL into one variable and keep for further use. After some navigation capture the current page URL and compare with the initial variable value. If both are same then we can say that presently we are in home page.
Scenario – 2
I home page contains “Login” button then search for that.
After some navigation if we can find the Login button in current page, Then we can say that we are in Home page.
76. How save the QTP test result which is in “XML” format into the specified folder in “html” format?
We have option in Export to HTML File in Test Result page (in File menu)
Or
Write a VBScript to convert all the result files from XML to HTML after the execution of test script.
To do this transformation at run-time we need to load the XML and then the XSL into Output file (in HTML) that and save the output.
QTP comes with three different XSL files which are present in the location “C:\Program Files\Mercury Interactive\QuickTest Professional\dat”
1. PDetails.xsl – Detalied HTML Conversion
2. PShort.xsl – Short HTML conversion
3. PSelection.xsl – Selective HTML Conversion
The last one (PSelection.xsl) requires input arguments for the XSL and the first 2 can be simply loaded into the XML.
Code:
sResultsXML = “C:\htmlresult\Report\Results.xml”
sDetailedXSL = “C:\Program Files\Mercury Interactive\QuickTest Professional\dat\PDetails.xsl”
sShortXSL = “C:\Program Files\Mercury Interactive\QuickTest Professional\dat\PDetails.xsl”
ApplyXSL sResultsXML, sDetailedXSL, “C:\htmlresult\Results_Detailed.html”
ApplyXSL sResultsXML, sShortXSL, “C:\htmlresult\Results_Short.html”
Public Function ApplyXSL(ByVal inputXML, ByVal inputXSL, ByVal outputFile)
sXMLLib = “MSXML.DOMDocument”
Set xmlDoc = CreateObject(sXMLLib)
Set xslDoc = CreateObject(sXMLLib)
xmlDoc.async = False
xslDoc.async = False
xslDoc.load inputXSL
xmlDoc.load inputXML
outputText = xmlDoc.transformNode(xslDoc.documentElement)
Set FSO = CreateObject(“Scripting.FileSystemObject”)
Set outFile = FSO.CreateTextFile(outputFile,True)
outFile.Write outputText
outFile.Close
Set outFile = Nothing
Set FSO = Nothing
Set xmlDoc = Nothing
Set xslDoc = Nothing
Set xmlResults = Nothing
End Function
Note: The results will display correctly only when the PResults.css file present in the same folder as HTML.
77. Why the QTP should be opened first and the application next? Is there any Significance?
When QTP starts there are some DLL (hook dlls) which are loaded in the memory. For QTP to record things it needs to know what is happening inside the APP i.e. messages it is getting and things like to determine about an event. Now for general windows there are Generic Window messages and hooks which can be used. That’s why you see that a browser launched before QTP will be recognized as a Window and not Browser. But when QTP is already launched QTP injects few DLLs inside the IE process (ie_hooks.dll) now this DLL helps QTP record the message of IE and help recognize it as a Browser.
78. What are the Tabs available in Test Settings?
The following are the tabs in Test Settings
Properties: Information of the Add-in’s and you can generate the script.
Run: Information of Datatable Iterations, Smart Identification Option, Options when Error Occurs during run time.
Resources: where you can upload the Function Libraries etc.
Parameters: where you can define the Input and Output parameters.
Environment: You can define the Environment variables, it is of two types Built-in and User Defined.
Web: You can define the Navigation timeout of the browser and Login credentials.
Recovery: You can define the recovery scenarios.
79. What are the disadvantages of Using Descriptive Programming?
Need skilled resource for creating the script
Time consuming.
Maintenance of the script is not very easy.
80. Type of Actions in QTP?
The following are the types of Actions in Qtp
Non-Reusable, Reusable, and External Actions.
81. What does Action0 Contains?
ACTION0: This directory contains files that control all actions, except ACTION0, in the test directory.
82. What type of file extensions can be accepted for User defined in Qtp?
Qtp accepts .vbs, txt and qfl.
83. What is Regular Expression and how many types we can do?
Special characters and sequences are used in writing patterns for regular expressions. The following describes the characters and sequences that can be used.
* Releases
* Requirements
* BPT
* Test Plan
* Test Lab
* Defects
2. What frame work you are using?
Sol: Business Process Testing.
3. How you plan for automation testing?
Sol:
a. Proof of Concept
b. Requirement Analysis and Automation Planning
c. Automation Preparation (Selecting the Areas to Automate)
d. Framework Design and Development
e. Test Automation Development
f. Test Execution and Reporting
g. Maintenance Phase.
Test plan is decided by the test lead in that he decides, what to do (which module has to be tested) how to do (which test has to be done) when to do (date and time) who to do (the name of test engineer who is going to do the testing on that allotted module).
4. Types of repositories?
Sol: Per Action file extension is .mtr, and Shared Repository File Extension is .tsr.
5. Can u associate both repositories with action?
Sol: Yes we can associate.
6. What is Object?
Sol: Objects are the fields and buttons, objects in Application where we use to perform operations.
7. What is Physical description of an Object?
Sol: Physical descriptions are property’s which will uniquely identify an object in an application.
8. How QTP recognize objects?
Sol: Quick Test stores the definitions for application objects in a file called the Object Repository. As you record your test, Quick Test will add an entry for each item you interact with. Each Object Repository entry will be identified by a logical name (determined automatically by Quick Test), and will contain a set of properties (type, name, etc) that uniquely identify each object. Each line in the Quick Test script will contain a reference to the object that you interacted with, a call to the appropriate method (set, click, check) and any parameters for that method (such as the value for a call to the set method). The references to objects in the script will all be identified by the logical name, rather than any physical, descriptive properties.
9. How to get data from cell? How we iterate table?
Sol: We will use Getcelldata to get the data from the cell.
10. If page contain 15 same type of object how u will recognize?
Sol: Using Index Values.
11. What is repository manager?
Sol: You can use the Object Repository Manager to manage all of the shared object repositories in your organization from one central location. This includes adding and defining objects, modifying objects and their descriptions, Parameterizing test object property values, maintaining and organizing repositories, and importing and exporting repositories in XML format.
12. What is recovery?
Sol: While executing your scripts you may get some UNEXPECTED/UNPREDICTABLE errors. (Like printer out of paper). To “recover” the test (and continue running) from these unexpected errors you use Recovery Scenarios.
Recovery scenario manager is used to handle exceptions in run time, three steps to handle exceptions.
1. Trigger event: – Pop-up window, object state, Test run error and Application crash.
2. Recovery operations:-Select an operation to perform when the trigger event occurs they are 1. Keyboard or mouse operation 2.Close application process 3. Function call 4. Restart Microsoft windows.
3. Post recovery: – Select the last run operation you want to perform when the recovery operation is completed.
13. What versions of QTP you used?
Sol: I have used QTP 9.2.
14. What are the differences between QTP 8.2 and QTP 9.2?
Sol:
Mercury Screen Recorder
Dynamic Management of Object Repositories
Object Repository Manager
Object Repository Merge Tool
Multiple Object Repositories per Action or Component
XML Object Repository Format
Function Library Editor
Handling Missing Actions and Resources.
15. What is the need of framework when the Bpt itself a keyword driven framework?
Sol: We have tailored the Framework with minor changes to suit our requirement, we have not used Object Repository, instead we have used Text file where we have defined the objects and User Defined functions, Basically BPT is two layered Framework, we have made it three, the third layer is User Defined functions.
16. Tell me the applications which best suited for keyword driven, data driven, and hybrid framework?
Sol:
Keyword Driven= ATM.
Data Driven= Search Engines and Report based applications.
Hybrid=Mail applications.
17. Which type of object repositories you use for any project?
Sol. Shared.
18. What is the difference between Action and Function?
Sol:
1. Action is Application specific while function is Application independent
2. Action can return multiple values while function returns one value
3. Usually Action used where the object repository is required while function is used where Object repository is not required.
19. What is the difference between function and sub procedure?
Sol:
A sub procedure is a series of VBScript statements, enclosed by Sub and End Sub statements which perform actions but do not return a value. A sub procedure can take arguments. If a sub procedure doesn’t receive any arguments, its Sub statement must include an empty parenthesis().
Sub ConvertTemp()
temp = InputBox(“Please enter the temperature in degrees F.”, 1)
MsgBox “The temperature is ” & Celsius(temp) & ” degrees C.”
End Sub
A Function Procedure is a series of VBScript statements enclosed by the Function and End Function statements. A function procedure is similar to a sub procedure but it can return value to the calling function. A function procedure can take arguments (constants, variables or expressions that are passed to it by a calling procedure). If a function procedure has no arguments, it Function statement must include an empty set of parenthesis. A function returns a value by assigning a value to its name in one or more statements of the procedure. Since VBScript has only one base data type, a function always returns a variant.
20. What you consider while designing automation framework?
Sol: The main factors which should be considered while designing framework is
Architecture of the tool
Architecture of the AUT (Web/Client Server).
Time span
Requirements of the client.
Based on the above I will design the framework.
a) Application functional flow
b) Reusability of the functions
c) Repository types (OR for a Module or OR for the whole Application).
d) Settings in the Tool (Test Settings, Options, Object Identification, Run Settings, Record Settings).
e) Recovery And Exception Handling
f) Global data
g) Parameterization
h) Naming Conventions
i) Directory Structure
j) Scripting Guidelines
21. What is the most challenging work done in QTP?
Sol: ------------------------------------------------------------
22. Tell me one User defined Function you have written?
Sol: ---------------------------------------------------------------
23. Write the script for retrieve the number of rows in a Web table?
Sol: intRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
Messagebox intRowCount
24. Write the script to retrieve the enablity of the web radio group?
Sol: Browser (“Browser”).Page(“Page”).webradiobutton(search).GetROproperty (Enable).
25. How do you handle the exceptions from script in Applications?
Sol: With the Help of Recovery Scenario
Build in functions like Exists, wait, wait property.
26. What is BPT?
Sol: With BPT add-in one can create re-usable component. It’s very similar to re-usable action in terminology. But it is very user friendly and non-technical person can create automated scripts from Business Components in Quality Center.
27. What is the difference between Keyword and Hybrid Framework?
Sol: Keyword driven is basically on the specific keyword from the application,
Data Driven is used to do the Parameterization, inputting the values.
Hybrid is a combination of Keyword driven and Data Driven.
28. What is the version of .net framework used in QTP?
Sol: .net framework version 2.0.
29. What is Driver Script?
Sol:
Driver script is the script which drives the entire test based on actions performed on the objects.
30. What is a checkpoint?
Sol: Checkpoints compare the Actual results with the Expected results.
31. What are the different types of checkpoints in QTP?
Sol: Standard Checkpoint, Bitmap, Text area, Text, Database, xml, table, Accessibility.
32. What does Automation Test Plan Contains?
Scope and Approach of the Test Aut
Requirements (Good candidates and bad candidates for testing)
Automation Implementation
Test Management
Test Design Phase
Test Implementation Phase
Test Execution Phase
Test Environment Requirements
Organizational Structure
Roles and Responsibilities
Project Estimates
Risks and Mitigations
33. How do you call an Action and Function?
Sol: Call Function name, RunAction Action name.
34. How Does Run time data (Parameterization) is handled in QTP?
You can then enter test data into the Data Table; Data can be typed in or imported from Databases, spreadsheets, or text files.
35. What is keyword view and Expert view in QTP?
Quick Test’s Keyword Driven approach, test automation experts Have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View Expert view for advanced users.
36. What is the use of Text output value in QTP?
Output values enable to view the values that the application talks during run time. 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.
37. Explain QTP testing process?
Quick Test testing process consists of 6 main phases Plan, record, modify, debug, execute, analyze.
38. How does QTP recognize Objects in AUT?
Quick Test stores the definitions for application objects in a file called the Object Repository. As you record your test, Quick Test will add an entry for each item you interact with. Each Object Repository entry will be identified by a logical name (determined automatically by Quick Test), and will contain a set of properties (type, name, etc) that uniquely identify each object.
39. What are the types of Object Repositories in QTP?
Shared and Local
40. Explain the check points in QTP?
A checkpoint verifies that expected information is displayed in an Application while the test is running.
41. How does QTP identify objects in the application?
QTP identifies the object in the application by Logical Name and Class.
42. What is Parameterizing Tests?
When you test your application, you may want to check how it performs the same operations with multiple sets of data.
43. What is test object model in QTP?
The test object model is a large set of object types or classes that Quick Test uses to represent the objects in your application.
44. What is Object Spy in QTP?
Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object.
45. Can u test a website or a web application manually without using any automation tool?
Manual is concerned we can test Usability, Functionality, Security testing but whereas
performance is concerned we can’t do it manually accurate.
46. At what stage in the SDLC testing should be started?
Testing Starts from the starting sate of SDLC that is requirement stage where we prepare SRS or URS DOC.
47. STUBS and DRIVERS how did u use these in u r project
Stub: activity of missing components. (Missing Sub modules)
Driver: passes test cases to another piece of code. (Missing main modules)
48. Can you write test cases of design phase?
Yes we can write test cases at the design phase.
49. You have one string abc$sderd$. write a programe to remove the special characters.
‘Remove all non numeric characters
theString= “This*&(*&^%is The&^%&^%><.,.,.,’;’;’; String”
Msgbox “Before – ” & theString & vbcr & “After – ” & CleanTheString(theString)
Function CleanTheString(theString)
‘Msgbox thestring
strAlphaNumeric = “0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”‘Used to check for numeric characters.
For i = 1 to len(theString)
strChar = mid(theString,i,1)
If instr(strAlphaNumeric, strChar) Then
CleanedString = CleanedString & strChar
End If
Next
‘Msgbox cleanedstring
50. Difference between TO and RO properties.
GetTOProperty is used to set the Properties of the Objects which are stored in Object Repository.
GetROProperty is used to get the Properties of the Object from Run time.
51. Different ways of doing DP
Programmatic Description
set Objects (Creating your own Objects).
52. What is agile methodology, and what is the difference between others methodologies.
The Main motto of Agile methodology is adopt the change and plan and implement accordingly when ever the client requirement changes, in Agile methodology Changes in requirements can be injected at any time.
In other methodology’s it is very difficult to implement changes quickly as Agile.
53. What are the different methods for working in Webtable?
The following are the Webtable methods: GetRowCount, GetColumnCount, GetCelldata,
Check, Childitem, Childitemcount, Drop, Drag, Click Capture bitmap, GetROProperty, GetRowwithCelltext, GetTOProperty, SetTOProperty, submit, Tosting, Waitproperty.
54. What is Environment variables?
Environment variable Environment variables in QTP are like global variables in other programming languages which can be accessed through any part of the script. The values of these variables remains same irrespective of the number of iterations (unless you change them through scripting). These variables can prove to be very useful when you want a variable to be shared across various reusable actions.
There are two types of Environment variables, 1. Built in 2. User Defined.
Dim MyValue
MyValue=Environment.Value(“OS”)
Msgbox MyValue
Tip: Environment parameters are especially useful for localization testing, when you want to test an application where the user interface strings change, depending on the selected language. Environment parameters can be used for testing the same application on different browsers.
55. Write a function to reverse a string?
Dim MyStr
MyStr = StrReverse(“VBScript”) ‘ MyStr contains “tpircSBV”.
56. Name 10 Built in Functions in VB?
Split, StrComp, String, StrReverse, LTrim, RTrim, Trim, ScriptEngine, Call Function, Sub.
57. What is the use of Split function?
To split the given string
Dim MyString, MyArray, Msg
MyString = “VBScriptXisXfun!”
MyArray = Split(MyString, “x”, -1, 1)
‘ MyArray(0) contains “VBScript”.
‘ MyArray(1) contains “is”.
‘ MyArray(2) contains “fun!”.
Msg = MyArray(0) & ” ” & MyArray(1)
Msg = Msg & ” ” & MyArray(2)
MsgBox Msg
58. Why OK and OK-2 are there in Object Repository?
If there is a change in height of the Ok button then Qtp will recognize the button as Ok-2
58. How many ways we can parameterize data in QTP?
There are four types of parameters:
Test, action or component parameters enable you to use values passed
from your test or component, or values from other actions in your test.
Data Table parameters enable you to create a data-driven test (or action)
that runs several times using the data you supply. In each repetition, or
iteration, Quicktest uses a different value from the Data Table.
Environment variable parameters enable you to use variable values from
other sources during the run session. These may be values you supply, or
values that Quicktest generates for you based on conditions and options
you choose.
Syntax: Dim MyValue
MyValue=Environment.Value(“OS”)
Msgbox MyValue
To define them: Environment.Value(”name”)= “Narsingrao”
Random number parameters enable you to insert random numbers as
values in your test or component. For example, to check how your
application handles small and large ticket orders, you can have QuickTest
generate a random number and insert it in a number of tickets edit field.
59. How do you connect to database using vbscript?
Dim objConnection, objRecordset, strSearchCriteria
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
Set objConnection = CreateObject(“ADODB.Connection”)
Set objRecordset = CreateObject(“ADODB.Recordset”)
objConnection.Open “DSN=;UID=;PWD=;SERVER=;”
MsgBox “Connected”
objRecordset.Open “SELECT * FROM USER where username = ‘Ravi’” , objConnection, adOpenStatic, adLockOptimistic
If objRecordset.EOF Then
Wscript.Echo “Record cannot be found.”
Else
Wscript.Echo “Record found.”
Wscript.Echo “User ID is “&objRecordset(“USEREID”)
Wscript.Echo “User Name is ” &objRecordset(“USERENAME”)
End If
objRecordset.Close
objConnection.Close
60. How many times the script will iterate when in Local sheet contains 5 rows and Global sheet contains 10 rows? What is the default setting?
First it will iterate using the Local sheet data for 5 times and it will take the 5th row data and iterate for 10 times. So total 10 times it will iterate, because it will use the data in Global sheet.
By Default it considers the Global sheet data.
If the data is like Local 3 and Global 2 in this case qtp will take the data from local first and iterate for 3 times and the last row from local sheet will iterate for two times matching the count of Global sheet rows.
61. What does the Option Explicit do?
By Declaring an Option Explicit in the beginning, it will remove the redundancy of duplicate variables, it will not allow you to declare a variable any where in the script, because vbscript you can declare a variable any where. Using Option explicit it will make you declare a variable using dim. And it will check the spelling mistake if you do in the scripts while using the variables.
62. If I want a function to return multiple values what to do?
It is possible using an array.
63. How will you split the Phone number containing 10 digits in 2, 3 and 5 for phone number field for nation code, area code and Phone number?
Using Left Mid and Right functions we can split the sting.
For Ex: Dim MyVar
MyVar = right(“VB Script is fun!”, 4) ‘ MyVar contains “Script”.
msgbox MyVar
63. What is the extension for Function Library files?
The file extension for Library files is .qfl.
64. In which situation descriptive programming will be used?
Below is some of the situation when Descriptive Programming can be considered useful:
1) The objects in the application are dynamic in nature and need special handling to identify the object. The best example would be of clicking a link which changes according to the user of the application, Ex. “Logout <>”.
2) When object repository is getting huge due to the no. of objects being added. If the size of Object repository increases too much then it decrease the performance of QTP while recognizing an object.
3) When you don’t want to use object repository? Consider the following scenario which would help understand why not repository objects.
Scenario 1: Suppose we have a web application that has not been developed yet. Now QTP for recording the script and adding the objects to repository needs the application to be up, that would mean waiting for the application to be deployed before we can start of with making QTP scripts. But if we know the descriptions of the objects that will be created then we can still start off with the script writing for testing.
Scenario 2: Suppose an application has 3 navigation buttons on each and every page. Let the buttons be “Cancel”, “Back” and “Next”. Now recording action on these buttons would add 3 objects per page in the repository. For a 10 page flow this would mean 30 objects which could have been represented just by using 3 objects. So instead of adding these 30 objects to the repository we can just write 3 descriptions for the object and use it on any page.
4) Modification to a test case is needed but the Object repository for the same is Read only or in shared mode i.e. changes may affect other scripts as well.
5) When you want to take action on similar type of object i.e. suppose we have 20 text boxes on the page and there names are in the form txt_1, txt_2, txt_3 and so on. Now adding all 20 the Object repository would not be a good programming approach.
65. How can you find the number of checkboxes in a webpage?
i) Create a description object for the web check box
Dim objChkDesc, allCheckboxes
Set objChkDesc=Description.Create
objChkDesc (“html tag”).value=”INPUT”
ObjChkDesc (“type”).Value=”Webcheckbox”
ii) Retrieve the child objects
Set allCheckboxes = Browser(“Browser”).Page(“Page”).Child Objects(objChkDesc)
iii) Count the Check boxes
CountCheckbox=allCheckboxes.Count
Msgbox CountCheckbox
iv) Clear the Objects
ObjChkDesc = Nothing
allCheckboxes = Nothing
66. How can you select the check box present in a web table second column and last but one row? Web table rows changes dynamically?
1. Count the number of web table rows
intRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
2. Select the check box in cell of [“intRowcount-1”, 2].
Browser(“Browser”).Page(“Page”).Webtable(“Table”).ChildItem(intRowcount-1,2, WebCheckBox”,0).Set “ON”
67. How can you write the given text to a notepad and save it in the specified location?
We can do to by two ways
1) By using the QTP descriptive programming
strPath =”C:\type.txt”
SystemUtil.Run strpath, ’’ ”, ’’ ”, ’’ ”
Window (“Text:=type.txt – Notepad”).Type “happy”
Window (“Text:=type.txt – Notepad”).Type micAltDwn
Window (“Text:=type.txt – Notepad”).Type micLShiftDwn
Window (“Text:=type.txt – Notepad”).Close
2) By Using File system object of VB Script
Dim objFSO, objTextFile
StrPath = “C:\type.txt”
Set objFSO = CreateObject (“Scripting.FileSystemObject”)
Set objTextFile = objFSO.CreateTextFile (strpath, True)
objTextFile.WriteLine (“happy”)
objTextFile.Close
Set objFSO = Nothing
SetTextFile = Nothing
68. How can you click on the specified subject (Ex: Test Mail) link in a mail box?
1) Count the number of web table rows
IntRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
2) Find the column where Column name is “Subject” in the first row
intColCount = Broswer(“Browser”).Page(“Page”).Webtable(“Table”).GetColumnCount(1)
For i=1 to intoColCount
StrHeader = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetCelldata (1,i)
If trim(lcase(strHeader)) = “subject” Then
intColNumber = i
Exit for
End If
Next
3) Find the Row where Subject is “Test Mail”
For j=1 to intRowCount
strSubject=Browser(“Broswer”).Page(“Page”).Webtable(“Table”).GetCelldata(j, intColNumber)
If strSubject = “Test Mail” Then
intRowNumber = j
Exit For
End If
Next
4) Click on the Link
Browser(“Browser”).Page(“Page”).Webtable(“Table”).ChildItem(intRowNumber, intColNumber, “Link”,0)
69. How can you click on the second link in a Webtable cell? (The cell is having more than one link)
For Ex: Consider Row number 2, Column number 3
Borwser(“Browser”).Page(“Page”).Webtable(“Table”).ChildItem(2,3, “Link”,1)
In this the last number “1” denotes the index number, the index number always starts from “0” (for nth link, n-1)
70. How you write results to the Excel sheet ?
Test results will be written to the Excel sheet at the end of the Test execution by calling the Function
fnWritetoExcelSheet(strPath, intSheetno, intRow, IntCol, strResult)
The function will use the COM API for accessing the Excel and write and save the result.
The function will for this is
Function fnWritetoExcelSheet(strPath, intSheetNo, intRow, IntCol, strResult)
Dim objExcel, objWorkbook
Set objExcel = CreateObject(“Excel.Application”)
Set objWorkBook = objExcel.Workbooks.Open(strPath)
Set objWorkSheet = objWorkBook. WorkSheets(intSheetNo)
objWorkSheet.Rows(iRow).Columns(iColNum).Value = strResult
End Function
71. For a search, results are shown in a web table format. Depend upon the search information the number of records will vary. The web table will display contents slowly row by row when records are huge, how to confirm all the records are loaded and click last row?
1. Count the number of web table rows initial display
revRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
2. Count the number of rows after regular intervals
Do
intRowcount = revRowCount
Wait (20)
‘Wait for 20 sec or depend upon the interval of Each record loading time
revRowCount = Browser(“Browser”).Page(“Page”).Webtable(“Table”).GetRowcount
While (intRowCount=revRowcount)
3. Click on link in last row first column
72. What is the difference between Action and Function?
a. Action is Application specific while function is Application independent
b. Action can return multiple values while function returns one value
c. Usually Action used where the object repository is required while function is used where Object repository is not required.
73. What is the difference between Function and Sub routine?
Function Returns one value while Sub routine doesn’t return any value
74. Can we use the function defined in the external DLLs?
We can use the external DLLs using Extern.declare() method – Refer QTP help for further study.
75. How can you know that you are in the home page using QTP?
Scenario – 1
Initially we have to save the home page URL into one variable and keep for further use. After some navigation capture the current page URL and compare with the initial variable value. If both are same then we can say that presently we are in home page.
Scenario – 2
I home page contains “Login” button then search for that.
After some navigation if we can find the Login button in current page, Then we can say that we are in Home page.
76. How save the QTP test result which is in “XML” format into the specified folder in “html” format?
We have option in Export to HTML File in Test Result page (in File menu)
Or
Write a VBScript to convert all the result files from XML to HTML after the execution of test script.
To do this transformation at run-time we need to load the XML and then the XSL into Output file (in HTML) that and save the output.
QTP comes with three different XSL files which are present in the location “C:\Program Files\Mercury Interactive\QuickTest Professional\dat”
1. PDetails.xsl – Detalied HTML Conversion
2. PShort.xsl – Short HTML conversion
3. PSelection.xsl – Selective HTML Conversion
The last one (PSelection.xsl) requires input arguments for the XSL and the first 2 can be simply loaded into the XML.
Code:
sResultsXML = “C:\htmlresult\Report\Results.xml”
sDetailedXSL = “C:\Program Files\Mercury Interactive\QuickTest Professional\dat\PDetails.xsl”
sShortXSL = “C:\Program Files\Mercury Interactive\QuickTest Professional\dat\PDetails.xsl”
ApplyXSL sResultsXML, sDetailedXSL, “C:\htmlresult\Results_Detailed.html”
ApplyXSL sResultsXML, sShortXSL, “C:\htmlresult\Results_Short.html”
Public Function ApplyXSL(ByVal inputXML, ByVal inputXSL, ByVal outputFile)
sXMLLib = “MSXML.DOMDocument”
Set xmlDoc = CreateObject(sXMLLib)
Set xslDoc = CreateObject(sXMLLib)
xmlDoc.async = False
xslDoc.async = False
xslDoc.load inputXSL
xmlDoc.load inputXML
outputText = xmlDoc.transformNode(xslDoc.documentElement)
Set FSO = CreateObject(“Scripting.FileSystemObject”)
Set outFile = FSO.CreateTextFile(outputFile,True)
outFile.Write outputText
outFile.Close
Set outFile = Nothing
Set FSO = Nothing
Set xmlDoc = Nothing
Set xslDoc = Nothing
Set xmlResults = Nothing
End Function
Note: The results will display correctly only when the PResults.css file present in the same folder as HTML.
77. Why the QTP should be opened first and the application next? Is there any Significance?
When QTP starts there are some DLL (hook dlls) which are loaded in the memory. For QTP to record things it needs to know what is happening inside the APP i.e. messages it is getting and things like to determine about an event. Now for general windows there are Generic Window messages and hooks which can be used. That’s why you see that a browser launched before QTP will be recognized as a Window and not Browser. But when QTP is already launched QTP injects few DLLs inside the IE process (ie_hooks.dll) now this DLL helps QTP record the message of IE and help recognize it as a Browser.
78. What are the Tabs available in Test Settings?
The following are the tabs in Test Settings
Properties: Information of the Add-in’s and you can generate the script.
Run: Information of Datatable Iterations, Smart Identification Option, Options when Error Occurs during run time.
Resources: where you can upload the Function Libraries etc.
Parameters: where you can define the Input and Output parameters.
Environment: You can define the Environment variables, it is of two types Built-in and User Defined.
Web: You can define the Navigation timeout of the browser and Login credentials.
Recovery: You can define the recovery scenarios.
79. What are the disadvantages of Using Descriptive Programming?
Need skilled resource for creating the script
Time consuming.
Maintenance of the script is not very easy.
80. Type of Actions in QTP?
The following are the types of Actions in Qtp
Non-Reusable, Reusable, and External Actions.
81. What does Action0 Contains?
ACTION0: This directory contains files that control all actions, except ACTION0, in the test directory.
82. What type of file extensions can be accepted for User defined in Qtp?
Qtp accepts .vbs, txt and qfl.
83. What is Regular Expression and how many types we can do?
Special characters and sequences are used in writing patterns for regular expressions. The following describes the characters and sequences that can be used.
Post a Comment
Post a Comment