Tuesday, 6 July 2021

QTP FAQs

  1. how many modes are there in QTP ? describe about them ?
  2. How to do concurrency testing with QTP.
  3. How do you count items from a listbox using qtp
    1. use "items count" property.
    2. For eg, var = Browser(Browser).Page(Login).WebList(region).GetROProperty("items Count")
  4. what is the difference between bitmap checkpoint and image checkpoint . Explain specific real time usage of bitmap checkpoint and image checkpoint
  5. How do you load existing object repositery in a newly created script? Is there any "Load" equivalent winrunner function available in QTP?
  6. How to apply Regular expresions to a web page in QTP
  7. QTP Data table
    1. just use DataTable.SetNextRow in between the loop it will execute all the rows one by one.
  8. QTP code for running stored procedure
    1. I want to execute a database Procedure in QTP, the connection i am able top make but i am not able to execute the procedure and get the response from it.Also mention how to get response if out parameter is not in the Procedure but is there in Package somewhere.
  9. Color comparison test in QTP
    1. I would have coded this way,
    2. Suppose there is a page with background whose colour is blue. First I will capture the colour of the page by,
    3. page_bgcolour = Browser("").Page().GetROProperty("Color")
    4. Then  compare the colour  with a  vbscript constant.
    5. If page_bgcolour =  vbBlue then
    6. msgbox  "colour is blue"
    7. else
    8. msgbox "colour is " & page_bgcolour
    9. end if
  10. How to read data from runtime PDF documents
  11. How to handle QTP generated run time errors through Recovery Manager
    1. Please follow the below steps to handle the qtp generated runtime errors
    2. goto File>Settings>Run(tab)
    3. There is a dropdownlist for the actions when there is a runtime error.
    4. select your option and click on ok. Thats it
  12. How to record a script using the CMD (windows command line shell) ?
    1. If you want to run a command on CMD using QTP, u have to create an object
    2. set cmd=createobject("wscript.shell")
    3. cmd.run "cmd /k cd c:raghu"
  13. what is the difference in input/output parameter using at the following options. 1) test->setting->parameter (tab) 2) step->action properties->parameter (tab) and when and why? we use (1) and (2) ?
    1. The input and output parameter defined in Test>Setting>Parameter (tab) can be used as parameters using Parameter Utility Object. For example,
    2. If I want to search for orders in a date range, and want to know the count of orders that are displayed between the selected date range, we can define two input parameters, from_date and to_date and one output parameter, order_count.
    3. Now in the script,
    4. Browser("").Page("").WebEdit("").Set Parameter("From_Date")
    5. Browser("").Page("").WebEdit("").Set Parameter("To_Date")
    6. Browser("").Page("").WebButton("Enter").Click
    7. Parameter("Order_Count") = Browser("").Page("").WebTable("").RowCount
  14. how many ways you can execute test script?
    1. two ways
    2. 1 is by pressing F5 key
    3. 2) is by clicking Test menu->Run test
  15. Upgrading QTP Scripts Question
  16. what is the process to follow between writing the test cases & then automating it?
    1. generally test cases are designed and run in the first cycle of the testing.
    2. then only, in the following cycles you can automate the testcases that are manually tested atleast once.
    3. for automating the process, first you have to decide which test cases are to be automated.  in common, test cases that are written for high priority requirements are automated. because you have to make sure that the functionality that are related to high priority requirements should not be disturbed when new functionality is added in the following cycles.
    4. so first identify the test cases that are related to high priority requirements, then decide whether they can be automated or not. if they can be automated then,
    5. create a folder structure that can organize your testing docs and activities.
    6. create folders for your repository,results,scripts,recovery scenario,docs,log files etc,
    7. then plan, in which environment the scripts should be run, on which machines, which test suite ......
    8. for creating repository,
    9. navigate through your application by using the tool that u r  using by taking the steps in the testcase.
    10. this will add objects of the application that are related to your business cases.
    11. save this repository.
    12. create the result file, like which fileds should be there in your results file.
    13. then create the business functions, or test scripts as per your requirement.
    14. then execute the tests and instruct the tests to save the results in the created results sheet.
  17. what is QTP batch testing tool?
    1. Test Director  is the batch testing tool. Test cases are stored in test lab  and whole batch can be run.
  18. how to run a script in QTP without storing the properties in object repository?
    1. For example if you want to create an object which is an edit box,
    2. Set object_edit_box = description.Create
    3. object_edit_box("swftypename").value = "..."
    4. object_edit_box("swfname path").value = "..."
    5. object_edit_box("swfname").value = "..."
    6. Here an object_edit_box is created and u can assign the properties of the edit box by doing an object spy.


By descriptive programing.
Describing the information about objects in the script itself is called descriptive programming
  1. Explain about Descriptive programming with an example usage ?
    1. here is the example for descriptive programming
    2. set obrowser=description.Create()
    3. obrowser("name").value="Welcome to Gmail"
    4. set opage=description.Create()
    5. opage("title").value="Welcome to Gmail"
    6. here instead of adding browser,page i have created descriptions for those.Like this we can create descriptions for all
  2. How do you run alternate iterations from the data table
    1. Set your test settings to run for single iteration.. and use loops to run for all the rows and use code like below...set your first row to watever you want...
    2. Dim LastRow, currow
    3. currow = 1 ( or watver)
    4. Do Until currow = lastrow
    5. **all the action is done here
    6. currow = DataTable.GetCurrentRow
    7. currow = currow + 2
    8. DataTable.SetCurrentRow(currow)
    9. Loop
  3. Please Explain difference b/w function and Action?
    1. In Keyword view, when QTP interacts with application  under test it stores in the form of action. while in expert view QTP records scripts in the form of functions ( VB Script).
  4. What is the difference between application testing and product testing?
  5. What is the difference between keyword view and expert view?
    1. Expert View:   Actions performed by the user are shown in the form of script.
    2. keyword view :   Actions performed by the user are shown in tree format along with the input data . Even window and object details are shown. The correspondent window and object can be viewed.
  6. Where do you use Browser(ppLoginBrowser).Dialog(SecurityAlertDialog).Exist
    1. Used to check the existence of Security alert pop up
  7. How do you fetch data from search results grid using vb script. Is there any method to fetch value from grid.
  8. How do you call functions in QTP Project without adding test settings, resources(library functions).Is there any other way around?
    1. Add your library path which has all your VBScript files or functions to
    2. tools-->options-->folders
    3. lib_path = PathFinder.Locate("filename.vbs")
    4. Call executefile(lib_path)
    5. Then u can call functions which are defined in the filename.vbs file. You need not to have this in Test-->Settings-->resources
    6. Ex : Login(username,password)
    7. Login is the function which is defined in the "filename.vbs"
  9. When two parameters say a,b with specific values are defined in action1 and in action2 need to use those values in c say c=a+b. How do you do that in scripting
    1. action1
    2. dim a,b
    3. parameter("a")=10
    4. parameter("b")=20
    5. action 2
    6. dim c
    7. c=parameter("a")+parameter("b")
    8. msgbox c
    9. action1
    10. After writing this actions in action1 write output parameters a& b
    11. Navigation
    12. step menu->Action properties->declare out put parameters
    13. action 2
    14. write  input parameters a&b
    15. Navigation
    16. step menu->Action properties->declare input  parameters
    17. After that select keyword view
    18. select action1->right click->select action call properties->specify variables in "store in" for a * b
    19. selcect action2->right click->select action call properties->specify same variables in "value" for a & b
    20. press f5
    21. c=30


Action1(output parameter a,b with type NUMBER)
dim a,b
parameter("a")=10
parameter("b")=20
call to new action


RunAction "Action2", oneIteration,parameter("a"),parameter("b")


Action2(input parameter a,b with type NUMBER)
dim c
c=parameter("a")+parameter("b")
msgbox c


F5,gives u the output
  1. How to open multiple tests in QTP?
    1. It is no way to open multiple tests in QTP
  2. How do you use recovery management in the QTP? Explain with an example usage?
    1. There are 4 trigger events during a recovery should be activated.A pop up window appered in an opened application during test runA property of an object changes its state or value.A step in the test does not run succesfully.An open application fails during the test run.triggers are considerd as exceptions.Recovey senario manager provides a wizard that guides you through the defining recovery senario.1.trriggred events2.recovery steps3.post recovery test-run
  3. How do you change the Per-action Object repository option to shard object Repository option on the Test settings dialog window on QTP?
    1. we can simple follow the the path
    2. Test -> Settings -> Resources and change the OR type from Per- Action to Shared
  4. How to run QTP scripts recorded in Internet Explorer on a Netscape or FireFox browser? nestcape tries to read the code this way Window("Netscape Browser").WinObject("NS_AE_WindowClass").Type "http;//servername:8080/trial/" whereas for IE Browser("Browser").Navigate (Datatable.Value("url","Global")) so when i run the IE script on netscape it fails.
  5. How do you automatically update image checkpoint through script?
    1. one can update the image checkpoint. for that one needs to keep the cursor on the checkpoint script, then right click on that and then select the option update checkpoint n do the desired updations..
  6. How to get the value of a disabled edit box in QTP. What is the Winrunner" edit get info " equivalent function in QTP
    1. Dont use the TO property if ur trying to get the current value....use the RO property...even though it is disabled, the data could be changing at run time...
    2. object.GetROProperty("value")
  7. What is the Winrunner "prinntf" equivalent QTP command?
    1. "printf" in WR is equivalent to "msgbox" in QTP
  8. What is the difference between Test and a Business Component in QTP?
    1. Business Process Testing uses a keyword-driven methodology for testing, based on the creation and implementation of business components and business process tests. A business component is an easily-maintained, reusable unit comprising one or more steps that perform a specific task within an application. A business process test comprises a series of business components, which together test a specific scenario or business process. For example, for a Web-based application, a business process test might contain five components—one for logging on to the application, another for navigating to specific pages, a third for entering data and selecting options in each of these pages, a fourth for submitting a form, and a fifth component for logging off of the application. Business components and business process tests are generally created in Quality Center by Subject Matter Experts, although Automation Engineers can also create business components in QuickTest.
    2. Test objects are the objects in your test that represent the objects in your Website or application and is created and maintained by QTP. Run-time (Business) objects are the objects in your application during the test run and is created and maintained by IE,Netscape etc
  9. what is the difference between image & bitmap checkpoint in qtp
    1. The main difference between Image & Bitmap Check point in QTP is Image checkpoint compares or checks the properties of .GIF or .JPEG files that is only image files that too in bit by bit where as bitmap verfies or compares the properties of bitmap files (.BMP) in pixel by pixel format and also 1Bit = 9 pixels
    2. Image checkpoints : It check the values of image in our web or application
  10. What is Wait technique and Global technique in QTP?
    1. Here 2 ways to give a sync :- 1st one is :- "wait" function Wait (..)2nd one is :- "Sync" function This is Global Techniqe for Wait for loading the web application. Browser(.....).Page(.......).syncIf that application is windows based :- Window("....").WaitProperty("Enabled/disabled", True/false, time)
  11. How to find the ordinal position of an item in weblist without using array or instr function. ex: assume i have 5 items in weblist like US,UK,INDIA,CANADA,FRANCE. I want to know position of UK IN list
    1. ExpectedItem = "UK"
    2. WebListItemCount = Browser(....).Page(...).WebList(...).GetROProperty("items count")
    3. For i = 0 To (WebListItemCount - 1)
    4. ItemFromList = Browser(....).Page(...).WebList(...).GetItem(i)
    5. If ExpectedItem = ItemFromList Then
    6.    MsgBox ExpectedItem & "position is " &(i+1)
    7. End If
    8. Next
  12. Is it possible to add objects to the Object Repository during runtime
    1. yes it is possible to add objects during Runtime
    2. For QTP version 8.2
    3. Step->Object Repository
    4. It will open the object repository; please click on Repository and use add objects button to add required objects. Running of test meanwhile will be on a pause ... as soon as you complete adding objects the test will resume.
  13. How do you load selective 20 records out 50 records from xls sheet?
    1. By going to test >settings>selecting number of iterations
    2. Select Test > Setting > Run Here in Data Table Iterations you will get 3 options like1. Run one iteration only2. Run on all rows3. Run from ___ to rows ___So for your question, you go for third option Run from ___ to rows __.
  14. How to write the script for Upload file by using browse button into the web application?
  15. what is an data driven extensoin in QTP scrpit?
    1. .ddt is the extension in qtp script.....
  16. Explain about output values in run time mode
    1. The out put values will be maintained in the run time data table, only the object properities only stored in the object repository. this is a temporary file. the global sheet cant effected while running. that is global sheet values also available along with the out put values
    2.  while running it will perform two actions
    3. 1. it will capture the actual value
    4. 2. compare actual value with the epected value and analyse the results like the test is passed or failed
  17. what is the difference between data driven framework and keyword driven framework?
    1. Data Driven Framework :
    2. It is nothing but data driven test, performing the same functionality with multiple input values by using parametarization with the help of data table or data souce is called Data Driven Test.
    3. Keyword Driven Framework :
    4. It is nothing but keyword driven test or keyword view, used for parametarization.
    5. It is dividing into 4 parts.
    6. 1. item     2. operation     3. value      4. documentation     ----> in QTP 8.2
    7. In QTP 6.5 keyword view is nothing but Tree View. It displays the list of objects along with logical names.
    8. Parametarization:
    9. passing the runtime input values with the help of datatable or datasource is called parametarization.
  18. What is the main objective of Descriptive Programming
    1. The main Objective of Descriptive Programming:
    2. For Example, During Run Time u might not Know, how many Checkbox appears in a web Page, U have to Select all the Checkbox that appears. Then comes the Use of Descriptive Programming where u Describe the Testobject Checkbox with certain Properties and Check all the Checkbox that appeared during Run Time irresepective of the number of Checkbox appeared.
  19. What is the QTP environment
    1. QTP Environment is nothing but like Window consists different views like Expert view and Keyword view.
    2. By default, Data Table and Active Screen and Views.
    3. Consists Different Tool bars like Record,Data table,Object Repositories etc
QTP Environment 1. Keyword View - Graphical view of objects and steps added2. Expert view - Scripting area of the objects. 3. Datatable - for parameterization of values in and out from the object properties 4. ActiveScreen - For adding objects and checkpoints during static time 5. Menu bar for changing the Environmental settings in QTP
  1. what are add-ins why they are needed ? when should i select active x add-in ?
    1. add-ins are used to store library files of corresponding applications.
    2. if u working on web application u have to select web add ins
    3. before entering into qtp u will get add-in manager dialogbox,in that u have to select corresponding add-ins
  2. what is meant by test frame
    1. Test Frame work is nothing but Proces for testing.
    2. In QTP all Automation Tester are following Keyword Driven Frame work.
  3. What is the QTP environment
    1. QTP environment means what are the environment it support to do testing. Ex: Windows, Java Applications.Environments are depending on the Add-ins and purchased add-ins
    2. This is nessesary set up which has be done before test run. So that test run is carried out with any issues.
    3. Settings would be.
    4. Global Wait.
    5. Image capture while through out test run or On error or On Error and Warnings.
    6. On run completion displaying results or not.
    7. Loading nessesary Libraries
    8. And others
    9. Its better to set QTP Environment programatically as it assures no failure
  4. how to find load time,how to check font size,& GUI application & How to import datasheet pls tell me step by step
    1. To import Datasheet in Qtp  we have method like Importsheet,Thi smethod is used to import the contents of specified sheet of excel file to the specified sheet of the Data Table.
    2. syntax: DataTable.Importsheet("file location",source sheetID,target sheet ID)
    3. Exam:  DataTable.Importsheet("D:Santosh.xls",1,2)
  5. is it possible to compare the actual result with the database using QTP
    1. This code can be used for DB connectivity and verification of data from DBSet
    2. Conn=CreateObject("ADODB.Connection")
    3. Set rs =CreateObject("ADODB.Recordset")conn.open= "DSN=;UID=;PWD=;DATABASE="
    4. If Conn.State <>1 Then
    5. Reporter.ReportEvent 1, "DB Connect", "Connection to Server Not established"
    6. Conn = Nothing
    7. exit
    8. run
    9. Else
    10. Reporter.ReportEvent 0, "DB Connect", "Connection to Server established"
    11. End If
    12. rs.Open "Select * From tablename WHERE = " & , Conn
    13. Do While Not rs.EOF
    14. Row = Row + 1
    15. rs.MoveNext
    16. Loop
    17. rs.close
  6. what is the difference between test object and runtime object?
    1. A test object is an object that QuickTest creates in the test to represent the actual object in your application. QuickTest stores information on the object that will help it identify and check the object during the run session.
    2. A run-time object is the actual object in your application on which methods are performed during the run session
  7. why QTP is becoming more popular tool compared to other tools ?
    1. QTP is a better tool for management , it has Keyword view for managers information and expert view for expert tester.
    2. VB Script is used in QTP, which is easy and nearer to normal english language and even a programer who knows Visual Basic can easily use QTP.
    3. QTP can be use with .NET, Java , SAP and Oracle where as other tools are not that good when comes to latest technologies.
    4. Above all Mercury by it self promoting QTP more than Win runner therefore QTP is more famous.
  8. What are the different ways of parameterising in QTP ?
    1. There are four types of parameters:
    2. Test,
    3. action or component parameters enable you to use values passed from your test or component,
    4. or values from other actions in your test.
    5. Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply.
    6. In each repetition, or iteration, Quick Test 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 Quick Test generates for you based on conditions and options you choose. Random number parameters enable you to insert random numbers as values in your test or component.
    7. For example, to check how your application handles small and large ticket orders, you can have Quick Test generate a random number and insert it in a number of tickets edit field


There are six different types of parameterization


1. Data Table


2. Environment variabls


3. Random Number


4. Action Table


5. Through flats files


6. Through Excel sheet
55. In my interview, I was asked to "write up of your testing methods including QTP highlights"in a word document and submit. How should i begin and end it. Can anyone tell me the answer or e-mail the document
testing method r  3 like
1:black box testing
2:white box testing
3:gray box testing.
testing types r like
1:convenational testing
2:un convenational testing
     qtp is an automation testing we will use in project if project need it.


    for qtp we r having frame work   in this we will discu about process of testing .
56. what programing languages can be used as scripting languages
We can use VB script and Java Script
57. How to access values from Unix OS and how to write command in the unix OS through QTP?
Using the RTE[Remote terminal emulator] protocol. using this any remote terminal can be invoked. eg. Unix, Linux,Solaris, Mainframe
58. What is BPT?
BusinessProcess Testing enables non-technical Subject Matter Experts (working inQuality Center) to collaborate effectively with Automation Engineers


(working in QuickTest Professional). Together, you can build, document,


and run business process tests, without requiring programming knowledge


on the part of the Subject Matter Expert.


Components are easily-maintained, reusable units that perform a specific


task. They are the building blocks of business process tests. Each component


is comprised of several application steps that are logically performed


together in a specific order. For example, in a Web application, a login


component might be comprised of four steps. Its first step could be to open


the application. Its second step could be to enter a user name. Its third step


could be to enter a password, and its last step could be to click the Submit


button on the Web page. By creating and calling functions stored in


function libraries, you can enhance the component with additional logic to


test important details of the login task.


By design, each component tests a specific part of an application. When


combined, components are incorporated into a business process test in a


serial flow representing the main tasks performed within a particular


business process. For example, a business process test for a flight reservation


application may include a login component, a flight finder component, a


flight reservation component, a purchasing component, and a logout


component.


BPT is known as busines Process Testing  with BPT addin.One can create reusable component.Its 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 centre
59. how can we export the "test result" to any excel sheet automatically after completion of execution of test???
To export the "test result" in an external xls file the syntax is ------


DataTable.ExportSheet TablePath,SheetName


where, TablePath is the destination xls file path, e.g- "D:abc.xls"


SheetName  is the sheet name where the result is to be exported, eg- "MainSheet"
60. what is a active x control?can any one brief me about active x controls
Active X control is a set of rules for how applications should share information.Programmers can develop ActiveX controls in a variety of languages, including C,C++, Visual Basic, and java.
61. how qtp handles customised object
QTP handles the customised objects by using virtual objects.


By using virtual object " customised objests are converted in to standared objects", bcz qtp sometimes cannot recognise the  objects.


goto tools menu --> select new virtual object --> select the standed classname ( i.e object, button, check point ......) -->                              select the mark object-->select the customized object --> enter name -->ok


While recording the script qtp adds the customized object in object repositary.
62. how to identify an object which is not in the object repository
Identification can be done using descriptive programming.


Here is example # 1 with description object.


set EditDesc = Description.Create()


EditDesc("Name").Value = "userName"


EditDesc("Index").Value = "0"


Browser("Welcome: Mercury").Page("Welcome: Mercury").WebEdit(EditDesc).Set "MyName"


Here is example # 2 with out description object.


Dialog("text:=Login").WinEdit("window id:=3001","attached text:=Agent.*").Set "john"
Dialog("text:=Login").WinEdit("window id:=2000","attached text:=Password:").Set "mercury"
Dialog("text:=Login").WinButton("text:=OK").Click


These both method will be used in expert view to identify object with out object avaialble in object repository.


you can identify using descriptive programming using the object physical properties.


for Eg.


Use spy to see what are the properties of the object.


msgbox Browser("name:=browsername").page("title:=pagetitle").webedit("html tag := INPUT", "name:=user").exist


Running this statement will give you true or false.
63. How to report defects using QTP if we do not have Quality Center Server?
See it is possible with out test director connection.


After executing the script u got results in the results window, while executing the script u will write a script one test is pass that result will goes to data table . after executing script , test is passed and failed it will in the data table.


after getting results in the datatable . u can use datatable.exportsheet(file name)
64. what is the difference between window command and dialog command
window command work with only window in your application, but dialog command should work with window command.


ex.window("shopping").activate


incase of dialog box: u should with window command


that is window("shopping").windialog("items")


Windows command are generally follow the whole path...I mean if you are going to select a particular menu item then you have to follow the Window("A").WinMenu("B").WinMenu("C")....SelectBut the same is not followed for a dialog box. Most of the dialog box contains a text message and (OK/Cancel) button.Dialog box can be recognized by either following the window hierarchy or as a separate entity.(This depends hoe QTP recognizes)...the following two possibilities are there....Window("A").Dialog("B")......WinButton("OK").Click orDialog("B")......WinButton("OK")


65. what is the difference between window command and dialog command
WindowBox:


  1. It looks like a parent.
  2. Menubars are avalable.
  3. Toolbars are available.
  4. It is possible to drag the size.


DialogBox:


  1. It looks like a child.
  2. Menubars are not avalable.
  3. Toolbars are not available.
  4. It is not possible to drag the size.
66. what is the difference between Table checkpoint and Database checkpoint in QTP
Types of Checkpoint:


Standard Checkpoint - Checks values of an object’s properties.


Image Checkpoint - Checks the property values of an image


TableCheckpoint - Checks information in a table


Page checkpoint - Checks the characteristics of a Web page


Text /Text Area Checkpoint - Checks that a text string is displayed in the appropriate place in a Web page or application window


Bitmap Checkpoint - Checks an area of a Web page or application after capturing it as a bitmap


Database Checkpoint - Checks the contents of databases accessed by an application or Web site


Accessibility - Checkpoint Identifies areas of a Web site to check for Section 508 compliancy


XML Checkpoint - Checks the data content of XML documents
67. what is the difference between table check point and database check point in QTP
A table checkpoint checks information within a table on a Application


A database checkpoint checks the contents of databases accessed by your web site
68. Procedure to write and run a vbscript file to test applications using QTP if possible please explain with an example
you can write a seperate VB Script file and save it VIZ xyz.vbs and call it in the QTP.
The command to call VB Script in to QTP is


Executablefile"c:Document and settingDesktopxyz.vbs"


Above is the path of a VB script file.
69. What is the difference between low level recording and analog recording mode when it will be enabled.
Analog Recording—enables you to record the exact mouse and keyboard
operations you perform in relation to either the screen or the application
window. In this recording mode, QuickTest records and tracks every
movement of the mouse as you drag the mouse around a screen or window.
This mode is useful for recording operations that cannot be recorded at the
level of an object


Low Level Recording—enables you to record on any object in your
application, whether or not QuickTest recognizes the specific object or the
specific operation. This mode records at the object level and records all
run-time objects as Window or WinObject test objects. Use Low Level
Recording for recording in an environment or on an object not recognized
by QuickTest. You can also use Low Level Recording if the exact coordinates
of the object are important for your test.


For getting these two recording modes enable first you need to start record in contest senstive mode.  Then change the mode.

The main difference between Analog and Low-Level Recording is,



Analog Recording enables you to record with respect to Screen Co-ordinates.


Low Level Recording enable you to record on any object with repect to window.


One main difference is In Analog Recording, a single recorded statement is created, so that we cannot edit recorded statements.


In Low-Level Recording, statements are generated according to operation you do on that object. Each statement starts with "Window". Here we can edit the recorded statements
70. How can we use debug viewer in QTP.What is the use of that?
u can use debug viewer in the following way.  First enable the option Debug viewer in the view menu.  The debug view consists of three tabs Watch expressions, variables, commands. consider the following code snippet.


Dim A(5)


A(0) = 5


A(1) = 10


A(2) = 15


A(3) = 20


A(4) = 25


In the watch expression tab, add the expression A(2) which enables u to trace the value of an array element A(2) alone.  But the variables tab will show the values of all variables in the code when it is run in debugging mode.
71. If one string in a sentence dynamically changes, u can define output value summary using text after, text before in text output value. Suppose if more than one strig dynamically changes in a sentence, how will u define output value summary?
While putting the out put value assign the out put value to a Enironment variable Ex: Environment("aaaaaaa"), and use that Environment("aaaaaaa") as a global variable across the all actions.
72. What is the difference between functions and actions in QTP?
Reusable Action is peice of code that perform an action on the application , which has application logic.


On the other hand , Functions does not have the application logic . It performs a specific action on the data retrieved from the application and returns the result to the calling action.


For Ex: Your application has TextBox and Button,


Input  : In the textbox we need to enter a numeric value say 5.


Action : Calculate the Factorial


Expected : Factorial value should be displayed in the textbox.


Here setting a value to textbox , performing the click operation and corresponding verification is maintained in the Action , calculation of the factorial value to arrive at the expected output we use a Function.
73. what is paramerization in qtp and tell me how to parameterize the tests.could u please explain with an example.
Consider two actions Action1, Action2.  Define the input parameters say String1, and output parameters say String2 in the Action Properties (right click an action in keyword view and choose Action Properties>Parameters) for Action2


Now i want to pass the string value "Manoj" to Action2 from Action1 and get the string value "Cute manoj" from Action2.  Find the following code snippet in Action1 and Action2


Action1 :


RunAction "Action2", oneIteration, "Manoj", String2


msgbox String2


Action2 :


msgbox Parameter.Item("String1")


Parameter.Item("String2") = "Cute Manoj"


To retrieve the value of the input parameter : Parameter.Item("String1")


To assign the value to the output parameter : Parameter.Item("String2") = "Cute Manoj"


P.S.:  I run the code snippets in QTP. It is working fine.  No negative comments on this explanation will be accepted.

When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.   OR     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, Quick Test 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 Quick Test generates for you based on conditions and options you choose. 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 Quick Test generate a random number and insert it in a number of tickets edit field.


74. What is the procedure to use JavaScript in QTP?
You can run your java script (.js) and vbscript (.vbs) using Windows Script Host engine.
75. What are the most frequent errors you faced while executing your scripts?
1. Syncronization errors.
2. Object identification errors.
76. What is environmental variable? Explain me with an example?
Quick test can insert a value from the Enviroment variable list,which is a list of variable s & corresponding values that can be accessed from your test,Through out test run,the value of an environment variable remains the same,regardless of no of iterations,unless u change the value of variable programmatically in ur script.


             Environment parameters are especially useful for localization testing. There are 3 types of environmental variables


(1)User-Defined Internal


(2) User-Defined External


(3)Built-In


  Syntax: Set Environment("name")

A user-defined internal environment variable: These variables are saved with the test and are accessible only within the test in which they were defined. You can create or modify internal, user-defined environment variables for your test.



A user-defined external environment variable: when you create a .ini file and use the variables defined in the file for different tests. These variables are read only with in the test so they can be shared by multiple tests.
77. Maximum synchronizing time out in QTP
The max synchronizing time out In QTP is 999999 Miliseconds only.Because in this option it accepts only 6 Digits(i.e Highest is 999999).
78. How to check number of items in a WebList at run time. I have tried using Browser("browser name").Page("page name").Frame("frame name").WebList("list1").GetROProperty("length"), but it is not returning anything. GetROProperty("size") is also not working.
Folow the following simple steps


1. Go to the Active Screen and right on the drop down that u want to check
2. Click on Insert Standard CheckPoint.
3.Click on Ok of the Object Selection Dialog.
4. There will be a property in the Check Point properties Dialog Called "items Count" Check that property and Click OK.

GetROProperty("ALL ITEMs") returns string containing all the items in the list. these items are separated by delimiter such as ";" or a new line character. you can count these delimiters to get items count.



79. What is the difference between a Test and a Business Component? Is it necessary to use Business Component while testing an application in the real time?
On the basic idea a test is the combination of steps grouped by test cases.


Whether you can run the test (steps) manualy/automated by adding in test lab.


In Business prosess testing the combination of components wil become a test(business process test) Components are easily-maintained, reusable units that perform a specifictask. They are the building blocks of business process tests. Each componentis comprised of several application steps that are logically performedtogether in a specific order. For example, in a Web application, a logincomponent might be comprised of four steps. Its first step could be to openthe application. Its second step could be to enter a user name. Its third stepcould be to enter a password, and its last step could be to click the Submitbutton on the Web page. By creating and calling functions stored in
function libraries, you can enhance the component with additional logic to
test important details of the login task.By design, each component tests a specific part of an application. When combined, components are incorporated into a business process test in a serial flow representing the main tasks performed within a particular business process. The task of creating and running components and business process tests is generally performed by Subject Matter Experts working in Quality Center.
80. how to write scenario in QTP?
Scenario are sub set of one test case with same start , but different paths and same end.


We can use If else condition, Select Case , (conditional statements).


Test Case : Login, Close Main Application.


Step 1- Opn Application : Flight Reservation


Step 2- Enter User Name: "ABC"


Step 3- Enter Login: "mercury"


Step 4- Press "OK" Button


Step 5- Sync Point On Flight Reservation Window


Here come the scenario.


If Flight Reservation Window appears ,


Step 6 - Close Window


Else


Go to Step # 1  and move on unless you check all the login scenarios.


End if
81. What is the Test Object model in QTP?
QuickTest Professional automation object model to write programs that automate your QuickTest operations.


The QuickTest automation object model provides objects, methods, and properties that enable you to control QuickTest from another application
82. How will you load few objects in Active Screen? Assume in a screen i have lots of objects, if all these objects are loaded in ActiveScreen, then my memory and processing speed will be decreased. How to load a specified part in my screen so that, that part only will be displayed in active screen.
Yes,we control the Active Screen.


Navigation:


              Tools-->Options-->Active Screen tab-->press "custom level"button.


 A combobox will apppear--select the options or go to Reset to[combo box]


It contains the options like(Complete,partial[Default],Minimum,None)
83. Application is installed in one drive,how we can execute that application in another drive?
For running an application we use SystemUtil.Run command.


syntax :  SystemUtil.Run "c:program Filesmozilla Firefoxfirefox.exe",url,"C:","open"


Second last command specifies the drive where to run the application.
84. what are the addins we use for mainframes environment for QTP? How did u write macros?What is the main importance of VB macros in testing environment?
Terminal Emulator is the Add in used mainframes environment for QTP.
85. What is the repository for objects in QTP?
Object Repository is a file which contains all the objects of AUT. we can add objects to OR either by Recording or by adding particular objects to OR using Add objects button in OR dialogue box.


OR are of two types
1)peraction
2)shared
86. How to record objects of Windows taskbar
The best way to record the windows taskbar is "Analog Recording Mode".


       Because the Analog Recording enables u to record the exact mouse & key board opertions u perform in relation to either the screen.In this recording mode Quick Test records & track every movement around a screen or window.
87. In QTP, Which are the concepts are needed to do Functional testing and Regression testing?
QTP is totaly a funcational and regression testing tool, therefore all concepts in QTP are used for functional and regression testing.
88.What is QTP Environment variable? What is its use?
Enviroment variable are 2 types 1.Bulit-in,2.userdefine.use the Enviroment run the application any system...
89. What is source?
source ia a property.


  Source propertry:


                          Indentifies the COM object responsible for causing the script error.


  Syntax:    object.source


                 -it returns a string


   example: Err.Source
90. In QTP, I have knowledge of Actions, Parametrization, Checkpoints, Output Values, Regular Expressions and Virtual Objects. What are the concepts that I have to study yet, to test any real time project? Can any one suggest me regarding to this?
91. How to instruct Qtp to display errors and other description in the test result instead of haulting execution by throwing error in the mid of the execution due to error? For eg:object not found
You have the option in QTP-->Test-->settings--> Go to Run tab.


You can find the selectbox "when error occurs during run session." By default it is set as "popup message box".Thats why your test stops and error message displayed.Set it to "Proceed to next step".Then you can see the errors and other description in the result page.

You can use the statement "On Error Resume Next" when ever an error occurs qtp ignores the step and moves to next step,



if you want to see the error number and description use the code


if Err.Number<>0 then


msgbox err.number


msgbox err.description
92. How can i Save the snapshots in a specified folders using Scripting in QTP?
You can create a folder in runtime using VBScript and save active screens in that folder


Set fol=createobject("scripting.filesystemobject")


Set myfol=fol.createfolder("c:raghu")




<object hierarchy>.capturebitmap("c:raghupic.bmp")

We can save the Snapshot in particular folder or location by using CaputureBitmap.



Syntax:


           Object.CaptureBitmap "C:desktopramesh.bmp",true


we can use 2 format (1) .BMP format   (2) .png format


& True or False is optional
93. How do we do parameterization in QTP to insert values from a file?
we can do parametreization by three ways


1.first record the script and goto tools options  select datawizard and u see the list there for total  possible parametrised statements ara come there,u have ot select which one u want to do the paramreization.


select that option and click next,after select step by step option and it will ask which type of data u want to give to the varible, select  datatable there and click next after uhave to select the column name and click ok,automaticaly the script will be parameterized

Use File System Object to Open Text File and read data. Import data to datatable



Use that data to Parameterize.
94. Can we pass an array to a reusable action as an argument
95. What is the repository for objects in QTP
Test object is created by QTP in object Repository to identity runtime object during execution time.


Object Repository types:


     (1)Peraction:


                               In this mode QTP maintain individual entries files for all test scripts default.


     Navigation:    Test menu->setting->Resoures tab->peraction


     (2)Shared:


                             In this QTP  maintain individual common file to save all test script entries.


    Navigation:      Record your req.opertion->open object repository->click export->select your req.drive->enter file name->save->ok->take another test->test menu->setting->resources->select shared as repository types->apply


When task gets repeated what do you do. / how to handle dynamic objects,when task is repeated in multiple scripts what u do
Using regular expression we can check only the pattern of the text of dynamic objects.


Using "Outputvalue" we can handle all the properties of dynamic objects.
How can I add an action (external action) programmatically?
I think u can call an external call by using the " Run Action ActionName ,"IterativeQuantity" function
Does the candidate prefer Keyword processing or Expert processing and why? What problems have they encountered with the product? What areas are most difficult for them to implement. Have they used the suite in a collaborative team environment? What did they dislike and find difficult to accomplish within the group? What did they like about that environment? How difficult was it for them to deal with less experienced team members? Why? When Scripting for functional test, how have you verified specific functions/features/values of Objects/Pages/Images, etc..
QTP contains  Keyword view & Expert view.The name it self indicates meaning for it.coming to description on it.


Keyword view:


                    The keyword view gives all the description or documention in english it is using for candidate who have no knowledge in VB script.


keyword view contains following components:


item/opertion/value/documentation


Expert view:


                  All the description or matter contain in VB script only.It is easily


understand by the candidate who knowledge in VB script


The candidates perfer both of it according to their conveience
Does the candidate prefer Keyword processing or Expert processing and why?
It depends upon candidate.If candidate have some knowledge in VB he can perfer Expert processing.Or If candidate have no knowledge in VB he can perfer Keyword processing.
What is Virtual Object? Plz Explain me with an example?
Virtual Object:


                     To forcibly recogonize the unrecogonized objects by tool.


Navigation:


                Tools->Virtual objects->new virtual object->click next->select your class of objects->cilck next->cilck mark object->mark your req.object with + symbol-> click next->click No->click finish

Some time the QTP is not able recognize advanced technology in our application build.



To recognize these objects also forcefully Test engineers are using Virtual object concept.


Navigatiion->Tool Menu->Virtual object->New Virtual object->click Next->


Selected expected type->click Next->Mark non recognized object area->


click Next->click Next after confirmation->Specify logical name to new entry->


Save Yes or No to create more virtual object->click finish.
how can we convert the QTP test result and snaphots into a pdf file .
Yes, we can save the test results & snapshots into PDF format.like this


Navigation:


(1)record/Edit/Debug/run


(2)go to the results page or window right click on second pane,a pop menu will be displayed


(3) select the properties from the pop menu  & change the format
How to get the Consolidated Test Result in QTP
Consolidated Test Results


This is the one of way to get the consolidated test results




(1)Create a new test & generate the script and make it as reusable action & save the test.




Navigation:


      


                   Step menu à   Action properties à General Tabà Action name(we can




Change the Action name, but it is optional) / click on reusable action(listbox).




                     Like that create ‘n’ number of test & make Actions as reusable.




(2)Now open a new test & and follow the below procedure




         Goto keyword viewà Item column(action)à right click a menu will open à choose




Insert call to copy of Action or Insert call to existing Action(Any one)Ã browse the test




& click any option (At the end of the test/after the current step (default)) & click OK.




        Repeat the process to insert the next action.




       Finally Item column(Keyword view) looks like this:




                                                                 Action1


                                                                 Copy of Ramesh1


                                                                 Copy of Ramesh2


                                                                 Copy of Ramesh3




     Name of the actions is changed to ramesh1, ramesh2 etc.




(3)Run the test & analysis the result.
how to map custom objects in the .NET base application using QTP.
How to check text of a tool tip for .NET based application in the QTP.
SwfWindow("winAiOHomeCenter").SwfWindow("winToolStripForm").SwfButton("aniAbout").MouseMove 1,1
Wait(1)
Msgbox SwfWindow("nativeclass:=WindowsForms10.tooltips_class32.app.0.33c0d9d").GetROProperty("text")
How much time take for automation one Integration Test Cases using QTP
Depend upon the complicity of the Test case,


Test case is divided into 3 parts


1)     Functional


2)     Sanity


3)     Regression


If it is functional it will take less time , sanity will take medium time and regression will take more time


Suppose framework is ready for particular scenario , it will take less time to automate the Script
How will you check XML Exceptions in QTP? (Here it is XML Exception, not check point)
In QTP only four exceptions are there, they r


1)Pop exception2)object state3))testrun error4)application crash


i thought no exception for XML

XML checkpoint Checks the data content of XML documents. Note:-XML file checkpoints are used to check a specified XML file; XML application checkpoints are used to check an XML document within a Web page.


How can you delete the results file (XML) QTP
we can delete the result xml files using TestResults Deletion tool .


It is available in startmenu-->programs-->Quicktestprofessional-->tools-->Testresultsdeletion tool


We can delete unwanted results associated with our tests using this tool.


we have to browse our test then it loads all the results associated with our test. U can select the result and delete that one.
What is Sceinario ,How many types are available with examples explain to me I have recorded a signature in context sensitive mode but how to we over come on it
Analog Recording:


                       Enables u to record the exact mouse & Keyboard opertion.U perform in relation to either the screen or the application window .In this recording mode.Quick Test Records & tracks every movement of the mouse as u drag the mouse around a screen or window.


                        This mode is useful for recording opertion that cannot be recorded at the level of an object,for example recording a signature produced by dragging the mouse.


Syntax:


        Window("paint").RunAnalog "Track1"

Scenario is a doccument which discribes test cases for that scenario.



Ex: Flight App


Scenario                     TestCases


1.Login                       a.ENteragent Name
                             b.Enter Password
                             c.Click on ok


In QTP we have 3 types of recording


1.contexsensitive
2.Analog
3.Lowlevel
How is batch testing related to interface testing?

Consider the following list: I. Tests that will be executed for each build of an application II. Emergency tests that must be tested immediately III. Tests that use many data values, but perform the same actions IV. Tests that verify an application’s usability V. Tests that are executed infrequently VI. Critical tests that are tedious to perform manually Which of the above represent types of test cases that are typically good candidates for automation? A I, III B III, VI C I, IV, V D II, III, IV E I, III, VI ----------------------------- Q. Consider the tasks below (listed in random order): I. QuickTest Pro retrieves the physical description of the object from the object repository II. QuickTest Pro executes the statement III. QuickTest Pro searches the object repository for a logical name that matches the logical name of the object that appears in the script statement IV. QuickTest Pro queries the operating system to see if an object exists that matches the physical description of the object that appears in the script statement Assume that all objects are recognized by QTP and the object repository contains the correct descriptions for all of the objects contained in the script being executed. Which answer illustrates the correct order of tasks that are performed by QuickTest Pro as it plays back each statement? A II, III, IV, I B I, III, IV, II C III, I, IV, II D I, III, II, IV E III, I, II, IV


The Answer A i.e I and III


option I means typically Regression tests


option III means Data Driven tests


you cant have Automation for following options because:


For II: its not easy to develop automation scripts for emergency tests


For V: there is no use putting effort on tests which are infrequently used


For VI: if the tests are tedious to perform manually it will be even more tedious to create scripts for those tests


please correct if i am wrong

1 Question = Answer = E



2. Question = Answer = A
You create QuickTest Pro scripts for an application that performs a great deal of server-side processing which causes synchronization issues when the scripts are run. The only indication that the system is busy processing is an animated image of a flashing red light. Each time the system is finished processing, the image is returned to a static image of a green light. Assume that none of the image’s properties available to QuickTest Pro indicate whether or not the system is busy. What is the best way to enhance your scripts so that they will be able to wait while the system is busy processing? A Insert a bitmap checkpoint that checks for the green light image in your script at each location where you expect the system to spend excessive time processing. Set the checkpoint timeout value long enough to accommodate any delayed server-side processing.. B Insert a bitmap checkpoint that waits for the red light image in your script at each location where you expect the system to spend excessive time processing. C Insert wait statements in your script at each location where you expect the system to spend excessive time processing. D Increase the object synchronization timeout for your scripts. E Insert WaitProperty statements in your script at each location where you expect the system to spend excessive time processing. -------------------- Q. The application under test (AUT) is a web application that uses cascading style sheets (CSS). Within the application, there are several boxes for users to enter their information. Some of the fields are required and some are not. If a field is required, the text box has a border color of red. You must verify that if a text box is required, the border is in fact red. Assuming the logical name of the text box is “Name† and the color is assigned to the variable “Border†, consider the following code: 1. Border = Browser("Browser").Page("Page").TextBox("Name").GetROProperty(“bordercolo r†) 2. Border = Browser("Browser").Page("Page").WebEdit("Name").GetROProperty(“bordercolo r†) 3. Border = passEditStyle.borderColor 4. Set passEdit = Browser("Browser").Page("Page").TextBox("Name").Object 5. Set passEdit = Browser("Browser").Page("Page").WebEdit("Name").Object 6. Set passEditStyle = passEdit.currentstyle Which lines of the code hould be used to capture the border color of the text box if it is specified within the CSS? A 2 B 1 C 5->6->3 D 4->6->3 E This cannot be done. QuickTest Professional has no visibility to CSS properties and their values.

You create a suite of scripts which use a shared object repository. One of the objects, the status bar on your application’s main window, is named AFX4450. The object appears in many scripts and is causing confusion because of its non-intuitive name. You are asked to rename the object Status Bar. Which answer best describes what must be done to rename the object and ensure that all scripts in which the object appears execute without error? A. Only rename the object in the object repository. All the scripts in which the object appears will be automatically updated with the new name the next time the scripts are opened. B. Rename the object in the object repository and rename each instance of the object in all scripts in which it appears. C. Only rename the object in one of the scripts in which it appears. The object will be automatically renamed in all other scripts and in the object repository. D. Rename the object in one of the scripts in which it appears and perform ‘Update Run’ to update the object repository and other scripts. E Rename the object in each script in which it appears.


The ans is A.:


Only rename the object in the object repository. All the scripts in which the object appears will be automatically updated with the new name the next time the scripts are opened.


reason: QTP automatically updates the scripts when an object is renamed in


Shared Repository.That is the main advantage of using the shared Repository.

If you rename objects in a shared object repository in one test  and save the changes, when you open another test  using the same shared object repository, that test  updates the object name in all steps of the test . This process may take a few moments. If you save the changes to the second test , the renamed steps are saved. However, if you close the second test  without saving, then the next time you open the same test , it will again take a few moments to update the object names in the test  steps.


can we use qtp 8.2 with testdirector 7.2
No, we cant use Test Director 7.2 with QTP 8.2. Because QTP 8.2 supports QC(Quality Center)
Can we use QTP(8.2 or 9.0) with Test Director?
According to my knowledge Mercury bought "Quick Astra" in year 2000/2001, and after that Mercury name it as "Quick Test Pro" and from that onwards all the versions are introduced as QTP only and not Astra. Correct me if i am wrong.
wat is meant by Batch Testing
The SeQuential execution more than one test case is called as Batch testing.


Every test Batch is consists of mutiple dependent test cases. In those


batches every end state is base state to next case .Test batch is also


known as Test suit or Test belt.

Group of tests executing sequentially one by one is called Batch Testing.


can u explain qtp arcitecture,what are the terms in qtp architecture?
QTP Arcitecture:


 QTP architecture contains 3 terms namely


 (1)Linear driven test


 (2)Modular driven test


 (3)Keyword driven test


Linear driven test:


                      In this tester creates no of actions in single test.


Navigation:     open maintest(empty)->Insert menu->Call to new action->Click ok->record req. opertion.


Modular driven test:


                     In this tester Creates frame work with external actions.


Navigation:      Open maintest(empty)->Insert menu->call to copy action or call to existing actions.


Keyword driven test:


Navigation:      Record req. opertion->create function for all actions.
can we perform performance testing by qtp?
yes we can do performance testing thru QTP


the way is start transaction and end transaction.


Navigation: Insert -> Start Transaction


Insert -> End Transaction

no we cannot perform performance testing by qtp we perform it by manually,but we can perform load testing by qtp by using multiple users using tool.


what are types of ordinal identifier?
3 types of ordinal identifiers are available


1.Index-it provides the unique identification


2.Location:it is used for identify the physical location of the object


3.Creation time-it provides how much time it takes to create the object


the above 2 identifiers are used for both web and non web applications, but third one is used for web applications only

There are three types of ordinal identifiers that QuickTest can use to identify an object: Index—Indicates the order in which the object appears in the application code relative to other objects with an otherwise identical description. Location—Indicates the order in which the object appears within the parent window, frame, or dialog box relative to other objects with an otherwise identical description.CreationTime (Browser object only)—Indicates the order in which the browser was opened relative to other open browsers with an otherwise identical description


I am having trouble recording in QTP. I am testing webbased product, and this happens especially when I try to cancel a window or something on the browser, everything I record after that doesnt get recorded. Can anyone help me?

What is the difference between Index and Location in Object Identification In QTP


In addition to recording the mandatory and assistive properties specified in the Object Identification dialog box, QuickTest can also record a backup ordinal identifier for each test object. The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables QuickTest to create a unique description when the mandatory and assistive properties are not sufficient to do so. ---------------------------------------------------------------------------------------------------------------------------------There are two types of ordinal identifiers that QuickTest can use to identify an object: Index—Indicates the order in which the object appears in the application code relative to other objects with an otherwise identical description. ................................................Location—Indicates the order in which the object appears within the parent window, frame, or dialog box relative to other objects with an otherwise identical description. ---------------------------------------------------------------------------------------------------------------------------------Identifying an Object Using the Index Property -----------------------------------------------------------------------During recording, QuickTest can assign a value to the Index test object property of an object in order to uniquely identify the object. The value is based on the order in which the object appears within the source code. The first occurrence is 0. Note that Index property values are object-specific. Thus, if you use Index:=3 to describe a WebEdit test object, QuickTest searches for the fourth WebEdit object in the page. If you use Index:=3 to describe a WebElement object, however, QuickTest searches for the fourth Web object on the page regardless of the type, because the WebElement object applies to all Web objects. For example, suppose you have a page with the following objects: an image with the name Applean image with the name UserNamea WebEdit object with the name UserNamean image with the name Passworda WebEdit object with the name PasswordThe description below refers to the third item in the list above, as it is the first WebEdit object on the page with the name UserName. WebEdit("Name:=UserName", "Index:=0") The following description, however, refers to the second item in the list above, as that is the first object of any type (WebElement) with the name UserName. WebElement("Name:=UserName", "Index:=0") Identifying an Object Using the Location Property --------------------------------------------------------------------During recording, QuickTest can assign a value to the Location test object property of an object in order to uniquely identify the object. The value is based on the order in which the object appears within the window, frame, or dialog box, in relation to other objects with the same properties. The first occurrence of the object is 0. Values are assigned in columns from top to bottom, and left to right. For example, the radio buttons in the dialog box below are numbered according to their location property. Note that Location property values are object-specific. Thus, if you use Location:=3 to describe a WinButton test object, QuickTest searches from top to bottom, and left to right for the fourth WinButton object in the page. If you use Location:=3 to describe a WinObject object, however, QuickTest searches from top to bottom, and left to right for the fourth standard object on the page regardless of the type, because the WinObject object applies to all standard objects. For example, suppose you have a dialog box with the following objects: a button object with the name OKa button object with the name Add/Removea check box object with the name Add/Removea button object with the name Helpa check box object with the name Check spellingThe description below refers to the third item in the list above, as it is the first check box object on the page with the name Add/Remove. WinCheckBox("Name:=Add/Remove", "Location:=0") The following description, however, refers to the second item in the list above, as that is the first object of any type (WinObject) with the name Add/Remove. WinObject("Name:=Add/Remove", "Location:=0")
Can you record right click and the menu appearing after right clicking on any of the links in the browser...?? If YES then HOW...??
Yes,we can right click and select the links from menu.


Example:
If u want to right click on the link use


Browser(objBrowser).Page(objPage).Link(objText,objType).FireEvent "oncontextmenu"


This will opens the menu.If u want to click on any link in that menu


Browser(objBrowser).Page(objPage).WebElement(objText,objType).Click
Multiple instances of same browser is getting created in Shared object Repository . Please tell how to avoid this ? Example : Original : WEB_PAGE (VIEW COMPANY First instance WEB_PAGE (VIEW COMPANY_2 As per QTP Help file : By default, the name assigned to the Browser test object in the object repository is always the name assigned to the first page recorded for the browser object. The same test object is used each time you record on a browser with the same ordinal ID in future recording sessions. Therefore, the name used for the browser in the steps you record may not reflect the actual browser name
Since While You are Recording the Objects QTP is taking that Particular Instance as per the Properties in the Object Identificaiton Settings for that web Elements.


If you want to Have only One Instance you have to Normalize the Property for the Browser so that You can get all the Objects at Any Point of Time in the Same Instance
what is terminal Emulator? What is it used for in QTP? What is its purpose?
Terminal emulator, terminal application, term, or tty for short, is   a program that emulates a "dumb" video terminal within some other display architecture. Though typically synonymous with a command line shell or text terminal, the term terminal covers all remote terminals, including graphical interfaces. A terminal emulator inside a graphical user interface is often called a terminal window.


                A terminal window allows the user access to text terminal and all its applications such as command-line interfaces (CLI) and text user interface applications. These may be running either on the same machine or on a different one via telnet, ssh, or dial-up. On Unix-like operating systems it is common to have one or more terminal windows connected to the local machine.


              Terminals usually support a set of escape sequences for controlling color, cursor position, etc.
What is description of Object?
The description of the object is known as object physical description ie properties of the object.


For example....


HTMLTAG(<INPUT>) is one of the physical property of webedit object.
what is the use of "operation" which comes under "insert" menu of qtp 9.0,how to enable it
"qtp->insert->operation" is used in BPT(business process testing).
For this you have to connect to the QualityCenter server.


Go to File->Quality Center Connection->give the QC server IP address.
After doing this you can check that "insert->operations" is enabled.
what is the automation frame work?
A Framework is a defined support structure in which another software project can be organized and developed.


Typically, a framework may include support programs, code libraries and a scripting language amongst other software to help develop and glue together the different components of your project.


A logical structure for classifying and organizing complex information.


Ex. Reusability of coding (libraries), Driver files, and maintaining data in Excel, in a Folder structure.
Generally what object repository mode is preferred? Generally in real time projects we use Shared Object Repository file.
Saving objects in "Shared Object Repository" is the preffered way for the experienced tester, because if there is a change in any object of the application,you need to change the object description at one place and it will be changed for all the tests accessing that object. But if you save objects per Action and there is any change in the object,you need to change the description in all the action object repository. This is the default setting and is easy for new tester.
what do you mean by low level recording in QTP?
Any button with the text underline then it is sensitive then we will go for low level recording.


Means with in the object it makes sensitive ( it clicks on the object with the same x and y)


With in the object it makes x and y co-ordinates. When we run it clicks at the same x and y co-ordinates.

Low-Level Recording - enables you to record on any object in your



application, whether or not QuickTest recognizes the specific object or the


specific operation. This mode records at the object level and records all


run-time objects as Window or WinObject test objects. Use low-level


recording for recording tests in an environment or on an object not


recognized by QuickTest. You can also use low-level recording if the exact


coordinates of the object are important for your test.
What is Component...??
A component is a retrievable object associated with a package or module. Examples of module components are Source, Fullsource (source plus dependencies), Documentation, and Example. Available components vary from module to module and package to package. Note that source is not always available (it is never available for commercial software indexed in GAMS).
How to do link testing in a web application using QTP?
You can check statistical information about your Web pages by adding page checkpoints to your test or component. These checkpoints check the links and the sources of the images on a Web page. You can also instruct page checkpoints to include a check for broken links.


To add a page checkpoint while recording:


Choose Insert > Checkpoint > Standard Checkpoint > Select the Page item and click OK


The Page Checkpoint Properties dialog box opens.


Modify the settings for the checkpoint in the Page Checkpoint Properties dialog box.


Click OK to close the dialog box. A checkpoint step is added in the Keyword View and expert view.


Note: You cannot select the HTML Verification options while creating a page checkpoint from the Keyword View or Active Screen. You can select these options only when creating a Page checkpoint while recording.

By using page check point , we can do the link testing.



In page check point we options are there ...


1) Broken links


2) No of images


3)Load time
What is the difference between Select Cell and Activate Cell?
SelectCell Method: Used to select the specified cell in Virtual Table or Active X Table


Syntax:


Object.SelectCell Row,Col            Object is AcxTable Object


or


VirtualTable(description).SelectCell Row,Col


ActivateCell Method: Used to activate the specified cell in Virtual Table or Active X Table


Syntax:


Object.ActivateCell Row,Col            Object is AcxTable Object


or


VirtualTable(description).ActivateCell Row,Col
How to get the cell value from Virtual Table?
We can get the cell data value from the virtual table by the command


dim x


x=Browser("broesername").Page("pagename").Getcelldata(row,column)


msgbox x


Where row and column are the specified row and column in the virtual table.
Generally what object repository mode is preferred?
Generally there are two types of object repositeries used in qtp


1) Shared object


2) Preaction object


Shared type is preferred
How can u describe the basic flow of automation with conditional and programmatic logic?


What is meant by Source Control?
Revision control is an aspect of documentation control wherein changes to documents are identified by incrementing an associated number or letter code, termed the "revision level", or simply "revision". It has been a standard practice in the maintenance of engineering drawings for as long as the generation of such drawings has been formalized. A simple form of revision control, for example, has the initial issue of a drawing assigned the revision level "A".
How can I execute PL/SQL stored procedure (with parameters) thorough VBScript?
You can call the SPs in your DB, through VBScript.


Here is the code:


conStr="driver=sql server;server=servername;database=test;uid=sa;pwd=sa"
Set cmdObj=createobject("adodb.command")
Set recObj=createobject("adodb.recordset")
With cmdObj
.activeconnection=conStr
.commandtype=4
.commandtext="SP_Insert_EMP" - SPName
.parameters.refresh
.parameters(1).value=22 - Parameter values that i am passing to SP
.parameters(2).value="valuelabs" -
.parameters(3).value="QA" -
.parameters(4).value=7777 -
.parameters(5).value=NULL -
.execute
End with
How can I implement error handling in QTP
there are 3 kinds of errors that we can face :


(I)Generated by QTP


(II)Generated by Script


(III)Generated by AUT[Application under testing]/related environment


and following given are the ways to handle these kind of errors :


(I)Through Scripting :


Error Resume Next
On Error GoTo 0


If Err.Number = 7 Then
Statements
End if


(II)Through defining a Recovery Scenario, according to the situation we want to handle
How and what kind of VB functions do u use in QTP?
Mostly all the vb function can be used in QTP


As basically qtp uses the vb script as its scripting language
How can you write a script without using a GUI in QTP?
Yes, we can write scripts without Object repository by using Descriptive programming.


We can achieve this in two ways:


1. By creating properties collection object for the description, like


Dim ObjDesc


set ObjDesc=Description.create


ObjDesc("html tag")="INPUT"


ObjDesc("name")="Name of the object"


Browser("xxxx").page("xxxx").winEdit(ObjDesc).set "Uday Kumar"


2. By giving the description in the form of string arguments


Browser("xxxx").page("xxxx").winEdit("html tag:=INPUT,name=Login").set
How to load the *.vbs or test generating script in a new machine?
Add the line to your script


ExecuteFile "Path of the *.Vbs File"


Say


ExecuteFile "D:VBScript.vbs"
How to add run-time parameter to a datasheet?
go to step-action properties-parameter in inputparameters add


give the name of the parameter and in default value give the path of the excel sheet ex D:swarnadatasheet.xls like


i will explain this using insert in flight application


ids=parameter("inputdatasheet")
datatable.AddSheet("inputdatasheet")
datatable.ImportSheet ids,1,"inputdatasheet"


For i=1 to datatable.GetSheet("inputdatasheet").getrowcount
datatable.SetCurrentRow(i)


Window("Flight Reservation").Activate
Window("Flight Reservation").WinMenu("Menu").Select "File;New Order"
Window("Flight Reservation").ActiveX("MaskEdBox").Type "1010101"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "London"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set datatable.Value("name","inputdatasheet")
Window("Flight Reservation").WinButton("Insert Order").Click


Next


in above example my parameter name is inputdatasheet,excelsheet name is inputdatasheet, and variable name is ids
How to instruct QTP to display errors and other description in the test results instead of halting execution by throwing error in the mid of execution due to an error (for example Object not found)?
1. Here if you want the error at result window, then you can see the resultant error by using Reporter.ReportEvent.


The syntax is Reporter.ReportEvent EventStatus, ReportStepName, Details.


EventStatus - 0-Sucess, 1-Fail, 2- Just send a msg to test window, 3-warning msg


ReportStepName-Variable that returns the error


Details - You can write your own description for the Error


2. If you want to bypass that error and wants to continue with the remaining script, you can use Recovery Scenario
What is the use of descriptive programming?
The advantages:


1. One can start creating the scripts early in the Sofware Development even when the Application GUI is not avaliable for recording and play.


2. It is an ideal approach if the application is under development and the object implementation is changing frequently. This might require re-recording to make the script runnable.


3. One can mae use of the descriptive prgarmming in the exception handing which gives an easy way for exception handling.


4. This way one can crate a very robust regression test-suite which will not fail anytime a new build is tested.


5. In case of the content verification of a page say report, it becomes essential to use descriptive as the report size may change depending upon the entered records everytime we generate the report. Eg. Expense Summary report, etc. Here simple recording will fail the script if the report changes. Also, if the report is Excel based, we can use the Excel application object and its rich methods and properties to parse through the report and validate the contents.


6. We use descriptive prorgramming in place of wait statement in the cases like downloads of report or other objects like animation, java applet, etc as the Checkpoint facility of QTP may retard the speed of the script run.


7. It is observed that the descriptive programming gives an easy maintainability of large test-suits. When one uses the descriptive programming comprehensively, one can do without OR causing light scripts easy to upload/download to/from Quality Center.

Main advantages of Descriptive programming are :-



1)There is no need of Object Repository to store objects.


2)Object properties can be given with in the Script and we can see properties there only.


3)Object identification is  easy compare to normal programming.
When there is a task that gets repeated in multiple scripts, what do you do in QTP?
When the same task is being repeated many times then create a action for that and make it reusable and call the action when and where ever required
If you have the same application screen with 7 drop down boxes and approximately 70 values how do you test with QTP?
In this case you can either the output values from drop down boxes in datatable and then use if else construct to validate the data.


Another thing is you can put a standard checkpoint on properties like "allitems" or "innertext".
How can I add an action (external action) programmatically?
U can call any action if it is reusable or external action.Goto insrt-call existing action then u will c a window select action in that from test u can browse n add.Diff b/w re-usable and external action is v can call any action with in the project--reusablev can call any action from 1 project to anothe project also.--external action
how to do regression testing using qtp
First we need to parameterize the test data and then we need to execute


already existing scripts on modifies Build
what is use of regular expression in qtp ?
It is used to identify "objects"& "textstrings"  with varying values

The Use Of Regular Expressions In qtp Is



Regular expressions enable QuickTest to identify objects and text strings with varying values. You can use regular expressions when:


   * defining the property values of an object in dialog boxes or in programmatic descriptions
   * parameterizing a step
   * creating checkpoints with varying values


For example, you can use a regular expression if you want to create a text checkpoint on a date text string, but the displayed date changes according to the current date. If you define the date as a regular expression, the checkpoint checks that the captured text string matches the expected date format, rather than checking the exact date value.


You can use regular expressions only for values of type string.
How we can automatically update image checkpoint through script? How we can covnvert diseble sub-menu button into enble button?

what is the automation frame work


STAF is an Open Source automation framework designed around the idea of reusable components. It is intended to make iteasier to create automated testcases and workloads. STAF can help you increase the efficiency, productivity, and quality of yourtesting by improving your level of automation and reuse in your individual testcases as well as your overall test environment..................................... If u want more detail information abt it goto this following link............ http://staf.sourceforge.net/current/STAFGS.pdf
How many types of environment variables are there in QTP? what are they?
we have two types of Environment variables in QTP:


1. Builtin Environment Variables(also called system defined variables)


2. User defined Environmental Variables (these are Two types Again)


 a. User defined Internal Variables


 b. Userdefined External Variables(Read Only)
How to run QTP scripts recorded in Internet Explorer on a Netscape or FireFox browser.
nestcape tries to read the code this way


Window("Netscape Browser").WinObject("NS_AE_WindowClass").Type "http;//servername:8080/trial/"


whereas for IE


Browser("Browser").Navigate (Datatable.Value("url","Global"))


so when i run the IE script on netscape it fails.
How to parameterize checkpoint ?
Insert the checkpoint and right click on the checkpoint statemnt and then select checkpoint properties option,checkpoint properties dialog box will be opended.


Select the property which u want to parameterize and check the parameter radiobutton.Click on parameter options button and select relevant options and enter the parameter name and click on ok. Finally click on ok button.
What is wiagentie.dll
I just ran a google search on this dll and came across your posting.


My organization has QTP in house and I receive an Internet Explorer error when accessing parts of one of our web applications.  Our tech guys isolcated this dll as the culprit.


What has been your experience?  On my pc, an occurrence of this file occur in the following directory:


C:Program FilesMercury InteractiveQuickTest Professionalbin




The problem with the web application only occurs on PCs which have QTP installed.
can any one tell me whether QTP is a Compiler or Interpreter
Yes, QTP is a compiler. Bcz it shows all errors after compile all statements in the script. While WinRunner is interpretor.
How to parameterize checkpoints?
Yes, we can parameterized the check points.


For this, First Insert a check point at any of the object. Then right click on "Check Check point"  and goto Checkpoint properties.With this a Checkpoint properties window will be opened. from this window we can parameterized the Checkpoint.
What is the differance between resuable action & library file?
Reusable Action :-
Reusable Action can be called from another action in QTP script.
Reusable action contains reused action e.g login to portal.


Library File:-
Library file contains function which can be called from any part of code.
Library file contain different reusable functions which need to follow any sequence. e.g Takesnapshot(browser, page)
For Clicking on Calendar dates from Calendar,How do we capture it in Object Repository and write scripts?
If Date field is editable in you application, try this below code to select date, insted of clicking on calender icon


we can directly insert date in to date field


Dim pStdt


pStdt = "04/19/2006"


Set Start_obj = Browser ("XYZ").Page ("ABC").Frame ("right").Webedit("txtStartDate")


Start_obj.object.document.frmPeriodMaintenence.txtstartDate.value =pStdt


How do we capture Web table and write a script for Webtable using QTP 8.2
We can capture the web table creating standard checkpoint in QTP.


This check point will compate the present data in the web table, and the data at run time.


To view the individual elements in a web table follow the below navigation:


Click Record button->Insert->check point->Standard check point->Click on a web table(It shows you the hirarchy of that web element)->Select the web table that you want to view the content.


We can get the value of any of the web element in this web table by using:


cellData=browser("aaa").page("bbb").webtable("ccc").getcelldata(rowno,colno)


Now this cellData will have the value of the web element.
What is BPT in QTP and how to create reuseable component in BPT?
BPT is known as Business Process Testing.


With BPT add-in one can create re-usable component. Its 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.
what is a virtual object and how can we create one in QTP?
Sometimes QTP is not able to recognise advanced technology objets. To recognise this type of objects we can use Virtual Object concept in QTP.
Can we create test scripts in QTP without using object repository or objects
yes it is possible


we can also instruct QuickTest to perform methods on objects without referring to the Object Repository, without referring to the object’s logical name. To do this, you provide QuickTest with a list of properties and values that QuickTest can use to identify the object or objects on which you want to perform a method. Such a programmatic description can be very useful if you want to perform an operation on an object that is not stored in the object repository. You can also use programmatic descriptions in order to perform the same operation on several objects with certain identical properties, or in order to perform an operation on an object whose properties match a description that you


determine dynamically during the test run.You can also instruct QuickTest to perform methods on objects without referring to the Object Repository, without referring to the object’s logical name. To do this, you provide QuickTest with a list of properties and values


that QuickTest can use to identify the object or objects on which you want to perform a method. Such a programmatic description can be very useful if you want to perform an operation on an object that is not stored in the object pository. You can also use programmatic descriptions in order to perform the same operation on several objects with certain identical properties, or in order to perform an operation on an object whose properties match a description that you determine dynamically during the test run.

yes it is possible



we can also instruct QuickTest to perform methods on objects without referring to the Object Repository, without referring to the object’s logical name. To do this, you provide QuickTest with a list of properties and values that QuickTest can use to identify the object or objects on which you want to perform a method. Such a programmatic description can be very useful if you want to perform an operation on an object that is not stored in the object repository. You can also use programmatic descriptions in order to perform the same operation on several objects with certain identical properties, or in order to perform an operation on an object whose properties match a description that you


determine dynamically during the test run.You can also instruct QuickTest to perform methods on objects without referring to the Object Repository, without referring to the object’s logical name. To do this, you provide QuickTest with a list of properties and values


that QuickTest can use to identify the object or objects on which you want to perform a method. Such a programmatic description can be very useful if you want to perform an operation on an object that is not stored in the object pository. You can also use programmatic descriptions in order to perform the same operation on several objects with certain identical properties, or in order to perform an operation on an object whose properties match a description that you determine dynamically during the test run.
what is Remote Agent in QTP
When you run Quick Test (QT) test from Quality centre, the QT Remote Agent opens on the QT computer. The QT Remote Agent determines how the QT behaves when a test is run by a remote applicationm such as Quality center.
how to ceate a shared reposi. in QTP9.0
QTP 9.0 ObjRep Concept entertly Different.


If you want to ObjRep Go to Object Rep and Export the Obj Rep and save in some location.


When u want to use these rep .


go to Resources --> Obj Rep Manager  and Add the Rep and continue with that Rep.
What is difference between Reusable Actions and functions in QTP(functionality wise)
Re-usable Action: an action that can be used numer of times when ever n where ever that perticular action is required. this perticular re-usable action can carry not only the script but also the data sheets which r related to that script.    ex: the login action is occured in 3times in an appliaction, if we prepared that action in re-usable mode that can be called in to QTP for 3 times r more than to that insted of recording/writing the script again, so that we can save the time as wel as memory of computer.


Functions: Funtions are different from re-usable actions. these funtions are related to VBScript not to QTP, becz we use VBScript for QTP. funtions like Time Funtion, date Funtion, Public Funtion, private Funtion etc.,
Is it necessary to have QTP installed machine "A" where we intend to run tests from machine "B" having QC or only installing remote agent on machine "A" should be enough?
I am not sure if this is what you are asking, seems to me that you wana know if you can have QTP installed on one machine and have it Run from a Different Machine... the Answer to this is YES you can do that but not via Remote Desktop, you will not be able to run QTP thru Remote Desktop because when you install QTP it generates a Machine Lock Code ... long story short do it with VMWare .. it is free to download .. just download VMWare Client ( the speed would suck though )
what r the good practices,coding conventions to follow while working on a QTP project
That depends on your group what you decide,


Here are some of them,


Should declare variable before using them.


Should create some scripting standards, templates, headers for script.


Should use version controller.
how to use global variables in QTP,What are user-defined envoirnment variables?
User-defined envoirnment variables :


User can define its enviornment variables which can be used throughout the script. Generally values like Temporary Path, enviornment variables are stored.
It can stored in two different types of files xml format or ini file.


To access enviornment variable syntax is Environment("variablename").


What is the extension for QTP Script file? Is there any extension at all?
he QTP Script File Extrension Is .mts


Batch File Extension Is .mtb


Recovery Scenario File Extension Is .qrs


Shared Object Repository File Extension Is .tsr


Per Action Repository File Extension Is .mtr
How many types object repository in QTP?
There are 2 types of object repositories:
1. Local (Per Action) object repository ( has extension .mtr)
2. Shared object repository (has extension .tsr)
A shared object repository can be used in multiple tests, but where as local OR can only be used in that test only.
How database testing is done using manual testing i.e., without using any automation tools
Database testing means to test 3 things:-


                  1.Whether data is storing and retriving from db or not:-


To check this we can take the help of Sql Profiler and Query Analyser if ur using SQL Server


                  2. Performance of the query :-


To check this we have to check the optimization of those queries.And to check whether Indexing is proper in that application or not.


                  3. Other properties of Tables:-


Check other properties such as :- If data length is more than specified data type length,memory overflow should not be there etc......
Explain about Smart Identification with a simple example
When QTP cannot recognise an object with its mandatory and assistive properties, at this point Smart identification mechanism is used, where QTP identifies objects with the help of Base Filter properties and Obligatory properties.Smart identification has to be enabled before u record the script.u will also notice a black hat in the test results for the objects identified using smart identification.The properties depend on the object and its env. Say u want to use smart identification for a dialog box in std windows env, then we select properties (while enabling smart identification)- is child window, is owned window, native class, object class.
Is it possible to change from Shared Object Repository to Per Action Repository or vice verse. if Yes then How
Go to Test-->Settings-->select the Resources Tab,There you can find Shared or Per action radio button,You can Select which ever you want.
what is the scope of a variable in an action?
1)You can add user-defined environment variables and these you can use any where in your script.


2)Create .vbs and define these variables there and then you can use it anywhere in your script.
what is action split and the purpose of using this in QTP? Also please explain calling an action. How is this done and why is it done?
split action is mainly used for re-usability of the application.


action split is nothing but spliting a action in to two parts saperatelly.


on calling an action go 2 call action properties and select call existing action.


for suppose use have save a file in your desktop then this property comes in picture.
what are the types of exception handling available in QTP and what is the difference between winrunner and QTP exception handling
there are four types pop up exception
test run
error
object state
application crash
How do I create an Action Sheet and ensure each row in the Action Sheet is executed in a single test iteration?
Unlimited.  Although I believe it will only support up to 255 excel documents.  It then becomes a question of how much memory your system has...
how many maximum actions can be performed in a single test
255 actions
How to create the dynamic object repository in QTP?
try with this code


set app=createobject("Quicktest.Application")


app.test.setting.objectrepositoryfilepath="give the path "


or else generate the script using generate script opt. , save it and open with natepad u wil get the code
How to pass parameters from one action to another action.
You can add output values to your test. An output value is a value captured


during the test run and entered in the run-time Data Table for use at another


point in the test run. When you create an output value, the test retrieves a


value at a specified point during the test run and stores it in a column in the


current row of the run-time Data Table. When the value is needed later in


the test run as input, QuickTest retrieves it from the Data Table. You can


output the property values of any objects. You can also output text strings


and the contents of tables and databases.
How to perform Cross platform testing and Cross browser testing using QTP?Can u explain giving some example?
Cross Platform Testing:


There is a provision of getting the Operating system in QTP by using the Built in Environment. Eg. Platform = Environment("OS"). Then based on the Platform you need to call the actions which you recorded on that particular platform.


Cross Browser Testing:


First get the type of browser you are using: Eg. Browser("Core Values").GetROProperty("version")


This will give you internet explorer 6 or netscape 5. Based on this value you call the actions which are relavent to that browser.
How to open multiple instances of an application from QTP? How to recognize each instance and setting values and triggering events in a particular application?

What conditions we go for Reusable Scripts and how we create and call that into another script? Please provide sample script


When we are going to call the action to another actiong we are going to set the calling action as reusable. By setting this then only you are going reuse some other action. otherwise you can not action that.


Ex:- Login


         We can record the script for one action and set in the action Properties as Reusable. When ever you need Login script you can call that Reusable Action.
Can we call QTP test from another test using scripting. Suppose there are 4 tests and i want to call these tests in a main script. Is this possible in QTP?
We can call any action in any test. For this, the called action should be Reusable action or External action.


The syntax for calling other actions in a test is:


RunAction "ActionName[TestName]"


Ex: RunAction "Action2[SampleTest]"
How can we insert Text check point and Bit map check point ? if provide example script, it is greatefull
To insert Text Check point we have two ways 1.While Recording  2.After Recording


1.While recording Insert->Checkpoint->Text Checkpoint is activated


For Example lets work on mercury tours site:We want to check whether the date exists on the page using text check point.While recording click on the Text Check point and then go for the place where you need to check the text on the site.Our Example displays the following code after clicking OK on the dialog box that appears.


Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Check CheckPoint("Jul 13, 2006")


2.The same thing can be done after recording.Go to the Active screen and select the text and Right-Click to Insert Text Checkpoint where the same code appears


This is same thing with Insert Bitmap Checkpoint by above two ways


Insert->Checkpoint->Bitmap Checkpoint


Click on the image which you need to check


Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Image("boxad1").Check CheckPoint("boxad1")
Can we mask a Code In .vbs file so that it is not viewable to others?
VBS file is visible in notepad only not in QTP. we can add .vbs files in QTP, test menu->setting->Resource Tab.
Is there any function to double click a particular row in a webtable?
There is something called as childitem using that make a webtable as an object and then use the row and column number to click a particular object.


set tbl = browser( ).page().childitem().click
what is the use of command tab in Debug viewer ?can we execute any user defined queries
Step Into


Choose Debug > Step Into, click the Step Into button, or press F11 to run


only the current line of the active test or component. If the current line of


the active test or component calls another action or a function, the called


action/function is displayed in the QuickTest window, and the test or


component pauses at the first line of the called action/function.


Step Out


Choose Debug > Step Out or click the Step Out button, or press SHIFT+F11


only after using Step Into to enter a action or a user-defined function. Step


Out runs to the end of the called action or user-defined function, then


returns to the calling action and pauses the run session.


Step Over


Choose Debug > Step Over or click the Step Over button, or press F10 to


run only the current step in the active test or component. When the current


step calls another action or a user-defined function, the called action or


function is executed in its entirety, but the called action script is not


displayed in the QuickTest window.
What is Analog recording,What is the difference between analog recording and low level recording
Analog Recording: enables to record exact mouse movement, drag mouse and keyboard operation in relation to either the screen or the application window


lowlevel and analog recording are almost same, except if the exact coordinates of the object are important for your test or component then should use this recording mode

Analog : Recording will record with xy co-ordinates of the object buut in qtp this corordinate will not display in the keyword view it will store the co ordinate in seperate file.hence the code will look neat.Low Level :Recording is an intermediate between normal and analog recording.let us take an example click event .while recording in low level of clicking the button it will only take the co ordinate of the button it will not take any other coordinate of the form


what is database check point.
Back end testing is also a part of functionality testing . QTP allows you to automate Back end testing using data base checkpoint. In the Back testing


test engineers are vaildating the impact of front end operation on back end tables content interms of data validation and data Integrity
What is the use of function and sub function in QTP?
Function and Sub Function are similar.  Only the difference is Sub Function will not return any thing to the function.  But using Function it returns result to the function.




We can use function wherever we neet it.


We can do parameterization and also reducing the lines of code, etc...
What is the new Version of QTP which is recently released in the Market?
The latest version of QTP is 9.0 but most of the companies are still using        QTP 8.2 version only.
How to call a funtion present in dll file in QTP Script.
Execute_File "Path of the .vbs file


We can call the functions in .vbs file by using ExecuteFile method.


Here is the example: Assume in my .vbs file i have function called Printing, then


public function Printing()
msgbox("Hello Uday")
end function


Now i can the function in this file as:


ExecuteFile "C:Documents and SettingsukumarDesktopSample.vbs"
Printing()
I have n iterations of test run in QTP. I want to see the results of not only the latest (‘n’th) iteration but also all the previous iterations (1to ‘[n-1]’th)
In test results window just open the test for which u have n iterations. there will be a combo that will show u the iterations. select the desired iteration and the result for that particular iteration is displayed in the test results summary window
What is the Difference Between Bit map Check point & Image Check point Please explain in detail Text & text area check point?
bitmap check point is checking a particular area or part of an image..whereas Image check point point is checking the entire window of the image


Text Check point: We can  use these option to verify values of specified object. QTP is allowing you to apply four types of test on object values such as Match case, Extact Match, Ignore, space, text is not displayed


Text Area check point: we can use these option to  apply testing on selected area of screen value.QTP is allowing you to apply four types of test on object values such as Match case, Extact Match, Ignore, space, text is not displayed
Is their any automation framework?
Framework is following the folder structure for future maintenance of all the scripts.


Eg: Saving the OR in separate folder and scripts in another folder etc.`
What steps the to be followed to write scripts in QTP?
To write scripts in QTP first we have to build Object Repository.  So, first add objects to the object repository, then set the properties for the objects.


Then write script in QTP depends on your requirements.
How to write QTP scripts?
First try to record any of the web application like google.  So that, you will be understanding the syntax of the the script and try to learn basics of the VB script.
What are the new features available in QTP 8.2 compared with earlier versions?
In QTP 6.5 version there are 2 views1.tree view2,expert viewIn QTPP8.21,keyword view2.expert view
Could any body tell me what is AMDOCS, and what are its models ?
Third-part software that is supplying their standard Telco Billing functionality (including customer management and accounts receivable), customized Billing functionality, and Order Management.
What is difference between window(" ") and dialog(" ") in QTP while creating script?
Window is a seperate window that appears on clicking on a particular link on which we can perform actions like edit the content etc.This will contain many objects like chkbox,edit box, combo box etc.


Dialog box is used by developers to validate a field.It will contain an alert message and OK or/and Cancel buttons.
How do you retrieve the Class name of a Test Object programmatically from within a script?
msgbox Browser("QTP : How do you retrieve").Page("QTP : How do you retrieve").Frame("google_ads_frame").Link("Fast Object Db/ODBMS").GetROProperty("micclass")
what are advantages and disadvantages between internet explorer and netscape navigator (or) Internet Explorer Vs netscape Navigator
These two major browsers are coming closer to each other regarding the DHTML effects possible towards newer versions. However you will need to remember that IE is more flexible than Netscape and due to small differences something that works really well in IE might not work at all in Netscape. So you need to be really careful and alert when programming for both browsers. One hint you can follow in most cases is that if you get it working in Netscape it should most probably work in IE.


Another major limitation of Netscape as compared to IE is that not all properties of a page can be changed at any time. This is because when the web page is once written to the screen, only position, visibility and clipping can be manipulated dynamically.


The good news is that from the web designing point of view you can now forget completely about debugging all your websites for Netscape 4.x as a very small fraction of the Netscape community still use it. Think of it this way, if you are bent on making the website work perfectly for version 4.x then you cannot use some effects (especially javascript and CSS) that are easily supported by the latest versions of all the major browsers.


For Dreamweaver to not keep throwing up Netscape 4 errors set the browser check settings to show Netscape 6 instead of the default 4.0. To do this click on the Results panel, select the Target Browser Check tab, click on the green arrow to show the list of options - select the Settings option and set Netscape Navigator to version 6.0.
Difference Between text and Textarea checkpoints in QTP
Text checkpoint enables us to check that the textis displayed in a screen , window, or web page , according to specified criteria. it is supported for all environments.


Text area checkpoint enables us to check  that  a text string appears within a defined  areas in windows applications, according to specified criteria. it is supported for standard windows, visual basic and activex environments
How to Handle dynamic WebList in QTP... Values in Weblist are different
Using Property Pattern to Identify Objects


If certain object property values in your Web site or application are generated dynamically for all objects of a given type, you can create a property pattern configuration file that instructs QuickTest to automatically record the object property string as a regular expression.


Note: The property pattern configuration file applies only to constant test object properties of type String. It does not convert the expected values of checkpoints (including automatic checkpoints) to regular expressions.


For example, suppose a Web site displays a number of thumbnail photographs and clipart images as the results of a search, with links to page containing a larger version of each image. The image name property for each image is generated dynamically, so the name of the
What are different execution modes available in QTP & explain them.
There are 3 execution mode in QTP they r:


1. Normal - the default mode where expected & actual results are verified & output is given.


2. Update - When u want to update the expected result then update mode is used.


3. Debug- this requires Microsoft debugger..

Run modes in QTP:



Verify mode (Default) - here when the script is run, it compares the expected result with the actual result and gives the test reuslt as Pass/Fail.


Update mode - here it updates the expected result with the actual result and does not show the test results.


Debug mode - executes the script line by line and checks for syntax errors and compilation errors.
How to write QTP test results to an Excel application
In addition to the creation of the excel object, you can use the ADO concept as well as the inbuit dataexport function of QTP.


1) ADO : In this , you have to create one DSN through ODBC for the Microsoft Excel *.xls driver. Using this define ADODB.Connection and Recordset for the required excel which you want to update. Then simply you can update any column using Recordset.Updte concept similar in VB


2) DataTable.ExportSheet "C:name.xls" ,1

I am Sending a sample example to this QS



Set Excelsheet=CreateObject(Excel.sheet)


Excelsheet.Visible=True


Excelsheet.Activesheet.Cells(1,1).Value=Variable


Excelsheet.Saveas"C:C.xls"


Set Excelsheet=Nothing
How to write recovery scenario for below questions and what are the steps we will follow? if i click save button.it is not saving i want to write recovery scenario how?
To write Recovery scenario u must 1st stop recording when u get an error then from Tools menu-> select Recover Scenario Manager


when Recover Scenario Manager window is opened u can follow the steps as they r descriptive & select the appropriate option for the type of error u recieve, u have to select what action is to be performed if this particular error occurs after completing the entire procedure u need to save the scenario as well as the file.


Then thru Test-> Setting-> Recovery option attach the file to the recording & u do have a choice of whther to activate on every step or etc etc...


thus u can use Recovery scenario to handle exceptions...

Trigger Event Pop up window or Test Run Error can be used for the above situation. If no error message pops up, then Test Run Error can be used.


How do you test DLL files using QTP?
What all u need to do is to create an object for that DLL.


Suppose take DLL as "Excel application".


First find the registry entry in the System Registry files and create an object using CreateObject function  in QTP .


like


Set <objname>=CreateObject("RegistryEntryof DLL");


Using this <objname> perform the actions .....like what you want to test in DLL do that.....
After importing external .xls datasheet in to Datatable of QTP, How to set NO of iterations run for all row in the Datatable? I mean We dot know How many rows are existed before importing the .xls sheet
FOR I=1 TO DATATABLE.GETSHEET("SHEET NAME").GETROWCOUNT


FOR i = 1 to datatable.getsheet("sheetname").getrowcount.getrowcount command will read up to the last record
How to test Dynamic web pages using QTP
if you know the one  property of the object .that is sufficient for the QTP to identyfy the object.if u know the one object property.at that time we need to use object identifier to identifithe object we need to add some more properties of the object. to give uniqe identification for the object.Or we need to go for the discriptive programming ,it bypass the objectrepository
How can I import and/or merge an existing repository into my current test?
Get Merge tool, you should get this once you install QTP + and you should getthis facility with other tools like Multitest Manager, Password encoder and batch runner.
What are the disadvantages or drawbacks in QTP?
1) QTP takes very long to open huge tests. Also CPU utilization becomes 100% in that case.


2) QTP scripts are heavy as it stores all the html files (for active screen) as well.


3) Block commenting is not provided till 8.2 version

QTP requires more memory. And some knowledge  of VB Script programming to create functions in project.


What is keyword driven testing please give process one example. what is the different between datadriven and keyword driven testing
Data driven Testing where you can drive whereas data with one application to check wheather it works for variable data (many inputs),keyword driven testing where the key word(keywordinput) of that perticular applicaton can be driven

Keyword Driven : In the Keyword Driven testing, user can defined screen objects. Suppose, user is adding page title, label name. when scripts are running...these objects will be verify with the scripts.



Data-driven scripts : In Data-driven testing, user is giving set number of values and replce these coulmns name with the declared one in the datadriven database.
How to change the Object Repository Mode using CODE? ie from Shared to PerAction.
This can be done by the following code:


Set qApp = CreateObject("QuickTest.Application")
 qApp.Test.Settings.Resources.ObjectRepositorytype = "Per Action"
 Set qApp = Nothing
I am working as Test Enigneer.In our company we are doing manual testing .I am keen to learn QTP tool...I download QTP from net..while conducting data driven testing i am facing problem please explain me how to paramaterize ,how to perform data driven testing
Fill a field say XX with your input data in global sheet table that you want to parameterize. Global Sheet Table located at the left bottom corner if you have QTP 8.2.


Click on Tools on menu bar and choose Data Driver


Choose the field you want to parameterize


Click on Parameterize Button


Click on Next and go with default value unless you know what are you doing.


Click on parameter Option button and point Global Sheet and the field XX.


Save and run, it should be fine.




Note: I would assume you have generated your script prior to Data Driven Test
what is the advantage of using action button in you presentation?
Action button is used to split ur recored script this reduces complexcity of  script.we can make actions of 2 type reusable action and non reusable action.by creating reusable action we can use it again & again in different scripts this save our time and memory.we can call any copy of action & can also append action
what is the difference between qtp script and vb script
QTP uses vbscript for recording.all the features ( functions) of vbscript are supported by QTP script.QTP scrips consist of checkpoint,synchronization,DDT functions , iteration repeat statements,action call etc.
While running a script on QTP 8.2 i got this run time error "General run error". What may be the cause for this error? and How to resolve this error?
General Run Error Comes in the Following Instances..


1)If ur Going with Data Driven Approach,If it could not find the External Data Sheet like Excel,Notepad etc.


2) If any Functions that u r calling in the script has some changes made..for example,if u use a function to open an exe as "Open Application",if the path of the Build has changed to New path, and not updated in the function "Open Application",then also QTP invokes the General Error!

This is occurred due to wrong syntax used or missing something while writing it. So check it for particular syntax where error occurred.


How do you export object repository?
to export the object repository [OR] follow the below navigation.


in the Menu bar select


Tools (option) >object repository  .Then u can view


OR .and some more detalis about object repository which consists of


1.Logical name: the name that Quick Test assigns to the object


2.Class: The class of the object


3.Find:By clicking on this u can find a property or value of object


4.Replace:here u can modify a property or value of object


5.Add/Remove property:which lists the properties that can be used to


                                             identify the object


6.object spy:using this u can view the properties of any object in an   


                        open window


7.Enable smart identification:indicates whether or not Quick Test uses


                                                     smart identification to identify the object


                                                      during the test run if it is not able to


                                                      identify the object  using the test object


                                                      description.
How to execute a Parameterized SQL query in QTP script?
to execute a parameterized SQL query follow the below procedure:


step 1: connect to Database using existing DSN(Data Source Name)


step 2: Execute selected parameterized  SQL query on that database.


PROCEDURE:


a)choose insert>checkpoint>database check point.Then the   


   Data base  query wizard opens


b)Select ur  database selection preferences and click Next .


  Now u can choose below options :


@ create query using Microsoft Query-opens Microsoft query,enabling u to create a new parameterized SQL query.Once u finish defining ur query , u return to Quick Test. This oprtion is available only if u have Microsoft query installed on ur computer.


@ specify SQL statement manually-opens the specify SQL statement screen in the wizard,which enables u to specify the connection string and an SQL statement.


@ show me how to use Microsoft query-Displays an insruction screen when u click Next before opening  Microsoft query.


c)if u choose create query using Microsoft Query ,Microsoft Query opens.Choose a data source and define a query.


If u choose  Specify SQL statemnt manually  the specify SQL statement


screen opens. Now specify the connection string and the SQL statement,and click Finish.


D)The checkpoints  Properties  dialog box opens.Select the checks to perform on the result set. U can also modify the expected data in the result set.


E) click OK to close  the dialog box.


step 3: retrive select statement  result  into  excel sheet(.excel)


step 4: Analyze that result .


To follow the above approach  Testing Team receive below information from  Development Team


1.DSN(Data Source Name)


2.Table Definitions


3.Forms Vs Tables


these three are combinely called as DATA DESIGN DOCUMENT(DDD)

Actually my requirement is, query should be parametrized. i.e, query should be in the script and also it should change dynamically. i.e i have to pass different values in the query condition field based on different criterias. (Where condition)



In this procedure (Which you have mention)Â can we change the SQL query? If we can plz let me know once.


For this i am following the below process (Which i came to know recently). Here i am giving the procedure. Plz check it once.


1 Connect to the database:Â Â Â Â Â Â Â Â Â Â Â Â


strCon="Driver={Microsoft ODBC for Oracle}; " &_


"CONNECTSTRING = (DESCRIPTION = " &_


"(ADDRESS = (PROTOCOL = TCP)" &_


"(HOST=XXXX) (PORT=XXXX))" &_


"(CONNECT_DATA = (SERVICE_NAME=xxxxxxx))); uid=xxxxx;pwd=xxx;"


2. Open the database connection


Set oCon=CreateObject("ADODB.Connection")


3.  Create the recordset object


Set oRs=CreateObject("ADODB.Recordset")


4. Define the Parameterized SQL query


strQuery="Parameterized query"


5. Execute the query


Set oRs=oCon.Execute(strQuery)

1 comment:

  1. Грибок - , вызываемый патогенными микробактериями, считается одним из самых широко встречающихся заболеваний, характеризующихся большой симптоматикой весьма неприятных проявлений. Подцепить эту острозаразную болезнь можно практически везде: в бассейне, на пляже, в сауне и любом общественном месте. Несмотря на то, что на рынке присутствует огромное множество самых разных фармацевтических гелей и мазей, до выхода на рынок инновационного комплекса Варанга быстро покончить с грибковыми бактериями, влияющими не только на эстетический вид ногтевых пластин и кожи ног, но и наносят при отсуствии должного лечения, необратимый урон тканям, было очень трудно. Благодаря этому инновационному крему, с неподражаемым натуральным составом, лечение грибка теперь не является проблемой. Не занимает много времени и не требует, как раньше, множества усилий. Вылечить грибок стоп можно будет всего за месяц использования мази. VarangaOfficial - капли варанга отзывы - все, что нужно знать об этом препарате. Воспользовавшись нашим онлайн-сервисом, вы получите возможность узнать всеисчерпывающую информацию касающуюся представленного средства. Увидеть данные о проведенных клинических исследований, прочесть отзывы реальных пациентов и врачей, использующих крем в своей лечебной практике. Ознакомиться с инструкцией по использованию, прочитать особенности и методы работы комплекса, понять, в чем заключаются особенности работы крема Варанга, где нужно покупать оригинальный сертифицированный препарат и, как не нарваться на подделку. Мы скурпулезно проверяем размещаемые на сайте данные. Предоставляем пользователям нашего ресурса сведения, которые берутся только из авторитетных источников. Если вы нашли признаки грибкового поражения стоп или уже довольно продолжительное время, без ощутимых результатов стараетесь избавиться от этого коварного недуга, наш сайт покажет вам легкий и быстрый способ решения проблемы. Приобщайтесь и живите здоровой полноценной жизнью. Теперь все ответы можно отыскать на одном сайте.

    ReplyDelete