f our qtp vb Script may be Currepted then What we want do?

Through array we can execute the testcase how ? give me example which browsers versions are supported in loadrunner 8.1?if any patches are required for browsers? How to swap two numbers by using parameter passing method byref in a fucntion and return the result to outside of the function? How to integrate the qualitycenter with qtp What is deference between Action and Test? with Examples? How to capture checkbox properties when properties of the object keep changing on relogin to the application.
what is descriptive programming?

IBM TCS
TCS CTS Wipro Satyam TCS

ell me types of environment variables? what r they? explain details? pls give anwer any one?

IBM

In smart identification, explain about 1. Base filter properties 2. optional filter properties with examples? give me descriptive programing code sample flight application in qtp? hi all QTP recognizing objects as "string_1","string_2","string_3","string_4" like that but when using FOR LOOP for these.QTP not proceeding further can i declare these _1,_2,_3,_4 as a single variable Important : Does QTP work in UNIX environment.

How to switch between browser tabs? )moving from one tab to another tab) Answer
Press Ctrl+Tab to switch between browser tabs

1.In VB Script 100 lines Script. How can check the Syntax errors? 2. Write a VB Script for X = India/Srilanka/Australia/England/South Africa.I need the Output Country wise? [ 1st Msgbox India , 2nd Msgbox Srilanka] ---- 3. How can Choose these test cases to be automated? Answer 1.Information tab. It will display all syntax errors in the #1
script while moving from expert view to keyword view.

2.Dim str str=Split(X,"/")

for i=0 to ubound(str) msgbox str(i) next 3.testcases which needs to be executed for each and every build.

how to count the word "IS" is repeated in the application using DP Answer str="mismismis" # 2 p=1

cnt=0 while instr(p,str,"is")>o cnt=cnt+1 p=instr(P,STR,"is")+les("is") wend msgbox"is is repeted for "&cnt

1.How to find in which row or column,string "Hyderabad" exist in excel sheet? 2.How to find how many times character "a" repeated in a given string "Koteswararao" Answer Option Explicit Dim a,b,c,i,leng,var #1
b=0 c="a" a="Koteswararao" leng=len(a) msgbox "length of"&" "&a&" "&"is"&" "&leng 'optional step

For i=1 to leng var=mid(a,i,1) If cstr(var)=cstr(c)Then b=b+1 End If Next msgbox "Total Number of a's in Koteswararao are"&" "&b

Answer #2

str="Koteswararao" st=Split(str,"a") Msgbox ubound(st) Please let me know if u have simplest answer than this.

How often you do the load test in your current project? Answer
Load Test is ideally done only once, and only after

#1

all the Functional Testing (UAT/SIT). Otherwise, i could depend on your client requirement.

This also depends on the Project / application demand. For Example if the application is like depends on the Data that is going to change every day with heavy fluctuations. Then we will keep certain time period (say 30 days) we will test the LOAD during these 30 days on every day to moniter the performance behaviour of the application.

Suppose there is a bitmap with some text in it how do you write the script to get the text. Answer #2
With quick test professional 9.2, you should try using Text Area Checkpoint, which will extract the text out of the image

What is the difference between Systemutil.run and Navigate. Answer Go through the below script, u may get the better answer #2
SystemUtil.Run "iexplore.exe","www.google.com" Browser("name:=Google").Navigate "http://www.cnn.com/" Browser("name:=CNN.com - Breaking News,").Page ("title:=CNN.com - Breaking News,").Link ("name:=Health").Click wait(10) browser("name:=CNN.com - Breaking News,").Back

SystemUtil.Run : By using SystemUtil.Run we can run any application from specified location. (as above SystemUtil.Run "iexplore.exe","www.google.com") 2nd example: to run the flight reservation login window SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe" Navigate : Open a specified URL in the browser i.e object.Navigate "URL specified" and here the object is the test object of type browser (as per above i.e Browser

"html tag:=Table").cnn.this contains some data.Browser("micclass:=Browser"). Use low-level recording for recording in an environment or on an object not recognized by QuickTest..WebTable("micclass:=WebTable".Browser("micclass:=Browser").("name:=Google"). u can define these objects as a virtual objects and map them standard class How do i relate the checkbox properties with webelement when checkbox properties are changing on every login to the application Answer we can solve this by using regular expression and setto pro # 1 perty method .page ("micclass:=Page").WebTable("micclass:=WebTable".getrowwithcelltext("text") 2)getcelldata syntax:.Run.colnum) What is the difference between low level recording and virtual object.getcelldata(rownum..Navigate "http://www. Virtual Obj. Answer we have two methods to get the data from webtable #2 1)getrowwithcelltext(we can get the rownum ) syntax:. Navigation and Invoke Application????? There is web page with the webtable.. Means. how do you manipulate the data.page ("micclass:=Page"). Answer Low-Level Recording²enables you to record # 2 on any object in your application."html tag:=Table"). This mode records at the object level and records all run-time objects as Window [Parent]or WinObject[child] test objects. whether or not QuickTest recognizes the specific object or the specific operation. Application may contaion objects that behave like standard objects but not recognize by QTP.com/") It is very much important to know the difference between SystemUtil..

WebEdit("txtSearch")..Click Problem: When running this test it gives an error at line no.getroproperty("name") objectheirarchy.link("link name"). 'then we are make using that variable to set into or QUESTION : I have recorded a test using qtp to download a file in an application.Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebButton("Search").Set "PmtType" Browser("MFA Work Queue Manager").Page("Rule Maintenance").setto property "name"."newval" 'here first we r getting dynamic changing link object pro "name" by getro prop in to the variable. Code: Browser("MFA Work Queue Manager").Click Browser("MFA Work Queue Manager").WebButton("Export").Page("Rule Maintenance").Click Dialog("Save As_2").Link("Rules Maintenance").Dialog("File Download")..link("linkname").Click Browser("MFA Work Queue Manager"). 5 as ..Page("MFA Work Queue Manager").Sync Dialog("Save As").Click Browser("MFA Work Queue Manager").WinButton("Save"). newval=oh..-----------------------------------------------------------1)by or ------1)go to or 2)select webcheckbox object 3)goto object properties pane 4)select the name property 5)in the value portion click 'configure value' buttton 6)replace constant with *..* 7)selct check box Regular expression ON 8)click ok 9)close or 10)now u run ur script 2nd way ---------' by using setto property method we can change the property value dynamically as follows.Page("Rule Maintenance").WinButton("Save").WinButton("Yes").

it starts giving me the above problem.xml #1 o/p.of non empty rows in a excel sheet through vb-script Answer by writing the for loop and you have to initialize for # 1 (i=0.. Check Property option but none of this changes work at all. unable to properly. i think it will work how to get no.. ANSWER: See. Descriptive programming for dynamically changing values what is output parameters in qtp?explain? 2) Answer standered output values. there are 2 "save" buttons in when you are running the script. I used exist property option. confused due identify them three way Use any one of these property.. This code I ran 4 times after recording at it was working fine but 5th time onwords. My Q is How to get the 2nd column value for corresponding 1 column input .count how to choose the framework in qtp ? 2)when we go for the descriptive programming ? Answer It depens what exactly u want to carry out.rows.textarea.Save button object is not identified by it's parent object. .database o/p If i entered 2 columns and 4 rows inputs in DDT Like Mango fruit. Carrot Veget. Banana Fruit. Brinjal Veget. so they will be distinguished in 3 i) Index value proerty ii)creation time property iii)Location property your script.text outputvalues.if Checking # 1 huge data then data Driven Frame work is enough... ur writing all ur reusable asa functions and want to call keyword could be good. QTP getting to the existance of 2 SAVE button. i++) Next This loop will include that the rowcount it will take first 0 and total count it wil compare to the max of rows if it wil true it will counts the nect row count Answer # 2 rcount=usedrange.. i<==num(i).

xls file? Answer #6 It is not possible to Export the Results Directely into Excel File.Value("A") datatable("c")=x Next Answer datatable.Value("A". ie.but it is possible to Export the Results into Runtime Datatable.getRowsCount For i=1 to strCnt #2 datatable.value(2..1)=x msgbox c -------------------------------------A c mango banana brinjal carrot Answer strCnt=DataTable.dtglobalsheet) msgbox bb exit else i=i+1 next How to export QTP results to an .in 3rd row ie. 1 is for global sheet msgbox x 'output is veget Answer i= inputbox "enter ur string" # say brinjal #4 r=datatable.1)=1 #compare the strings bb=datatable(b.getrowcount #get row count for i=1 to r #loop till the end of the row datatable.setcurrentrow(3) #3 x=datatable.SetCurrentRow(i) x=datatable. ( i need to get "veget" in messge box @ run time Answer datatable. .1) 'datatable.setcurrentrow(i) aa=datatable.value(2.1) where 2 is column name and 1 is sheet no.1) #1 msgbox x datatable.(a .i.dtglobalsheet) # column 1 value into aa if instr(aa.SetCurrentRow(3) x=datatable.Value("c".

" Window("Flight Reservation")."venu") Dialog("Login").xls"."venu" For i=1 to 9 datatable.WinEdit("Agent Name:").Set datatable ("A".Set datatable("C".WinEdit ("Name:").Einedit("AgentName")."venu") Dialog("Login").Click x = Window("Flight Reservation").")."venu") Window("Flight Reservation")..Value ("Agent1") End Function .exe" Dialog("Login").ImportSheet "C:\Documents and Settings\Administrator\Desktop\Mallik.Dialog("Open Order").WinEdit ("Edit_2")."venu")=x Window("Flight Reservation").Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.DeleteSheet "Global" datatable..Select "File.Open Order.Set "ON" Window("Flight Reservation").EX: datatable.1.Dialog("Open Order").SetCurrentRow(i) systemutil.Set datatable ("B".AddSheet "venu" datatable.Click Window("Flight Reservation").WinButton ("OK").Set datatable.DeleteSheet "Action1" datatable.Value ("Agent") Call the function Function Login(Sunny) Dialog("Login").Close Next Results:x values will be Printed into Runtime Datatatable in D column how can i pass parameters into function? Answer #3 We will defeinitely pass the parameters to Function Try with this Example First parameterize the Agent name with invalid data like sun Dialog("Login").WinMenu ("Menu").Einedit("AgentName").WinEdit("Password:").WinButton("OK").Set datatable.Dialog("Open Order").WinCheckBox("Order No.GetVisibleText() Datatable("D".

An open application fails during the test run.Number) & " " & Err. if window("XXXX").dialog("XXXX"). Since there is hardly any space to put up snapshots Answer Let me explain with out recovery scenario..Please explain me in detail! How to handle runtime errors in QTP useing recovery senario or with out scenario Answer There are 4 trigger events during which a recovery # 1 scenario should be activated. err.number.. # 3 we can handle exeptions like pop windows by using IF ELSE statements. These triggers are considered as exceptions and more details regarding how to use Recovery Manager is given in the QTP User Guide. A step in the test does not run successfully. err. under a single column of a run time datatable? .raise.exist then window("XXXX").winbutton("XXXX"). err. We can use this also.Description)'this lines given the error number and Description Err.click else <put remaining script here> end if and also by using methods like "on error resume next.dialog("XXXX"). They are A pop up window appears in an opened application during the test run.Clear 'this will clear the Error Answer and also. A property of an object changes its state or value. There is a QTP Utility function to kill the window by process.information" methods.. We can also Stop the error by using below lines MsgBox ("Error # " & CStr(Err. How to add multiple values in rows. for example.click window(("XXXX)).winbutton("text:=XXXX"). #5 If any un-expected popup window appears Then we can close all popup windows by using kill process by window name.

i want action1 output becomes to action 10 input? pls any can give script for this scenario? We need to create Action-Parameter for both Actions. By reviewing. in Action1_Properties:(Input-Parameter: InputName. how can we merge the object repositories?is ther any option in qtp to merge the object repositories if we have two or three object repositories? An Let us suppose that there are three object sw repositories(shared)A. we can get an insight what is the status of the project.importsheet sourcefile. If any problems are arised. OneIteration. workarounds can be implemented. Type) THEN RunAction "Action1".value(parametername.C er Go to Resources-->Object Repository Manager-# >Tools-->Object .addsheet(tagretsheet)datatable.sheetname)=parametervalue I have 1 to 10 action are there. OneIteration RunAction "Action10".sourcesheet. For eg. are there any obstacles while completing our project.B. when we review the tectcases we have to identify the mistakes but not solution. what are different things. OutPutName what is the main use of reviews To trace out whether the process is going on without any interruption.Answer BY importing the data from external excel sheet #1 1) first addsheet 2) importheet from excel to the local datatable datatable.targetsheet or else u can manualy give the values into the shhet datatable. Type) 'Assigning the InputName value to the Variable in Action1_Script: Action1_Param=Parameter("InputName") in Action10 properties (Output-Parameter: OutPutName. For Better test coverage.

if you get the scripts. As an example we can open an excel sheet in QTP using the library functions available in the VB scripting. Then click ok button and it will merge the A and B repositories. Answer #1 How to change the run-time value of a property for an object? Answer #1 SetTOProperty changes the property values used to identify an object during the test run. you can compare the . To merge C repository to this (same navigation as above) andhere C is secondary file. That is the script of the excel sheet. Analyzing the Checkpoint results ? Answer #1 Standard Checkpoint: By adding standard checkpoints to your tests or components. c) If you want script to excel sheet then start the record and open the one new excel sheet then stop the record after check script. In QTP data table have two Answer a) types of the Excel sheet. d) Once do this function of the excel sheet. #2 b) If the extra Excel sheet wants then you create in the data table window in QTP. This facility is possible in QTP data table window. Select the path of the A and B files using buttons and select them. How can we open an Excel sheet through the script This question is related to automation. Only properties that are included in the test object description can be set.5 Repository Merge Tool Then we will get one box with two options Primary file and secondary file.

. create the desired library files(vbs files) nd save them in corresponding folders.doc files are there (together).see below code Here i open the file from mentioned path and read and write the values on that. Explain key word driven frame work?How to use in real time? Answ In keyword driven framework we develop the er functions for the scenarios nd these functions are executed based on the objects.txt". ave .xls..expected values of object properties to the object's current values during a run session. 1. True) ' open to empty file and also use for open the file which is already created WriteLineToFile = f.OpenTextFile("c:\DIM. the checkpoint fails.txt.xls file among them? how can we write function? Answer #1 using the extention (. Set fso = CreateObject("Scripting.txt". i want find only . If the results do not match.FileSystemObject" ) Set f = fso...(repository folder) create the desired recovery files nd save them in corresponding folders. like wise we have to create all folders Execute the test Analyse the results. # 1 And for a project we have to first create a folder structure 1)Repository 2)Recovery 3)library functions 4)test data 5)Log file 6)environment 7)Test script.CreateTextFile ("c:\kamesh.xls) in code.ReadAll 'Read all the file line to line msgbox WriteLineToFile Set MyFile1 = fso.WriteLine WriteLineToFile ' Write all the stuf .. create the desired repositories& save them in corresponding folders.True) 'create new empty file MyFile1.

files For Each FileName In fileObjs If FileName. how to add run-time parameter to a datasheet? Answer #1 a = Datatable. what is "key" in It.Close Answer #2 Set fileSysObj=CreateObject("Scripting. Indicates the . Answer #1 In Keyword framework .AddParamete r ("paraname".of columns") For i = 1 to b Datatable.getfolder(folderPath) Set fileObjs=fileObj. IterationRange String Not always required.GetParamete rCount If a = "" Then b = inputbox ("Enter the no.GetSheet("sheetname").GetSheet("SheetNmae"). [IterationMode .Name) End if next else MsgBox("Folder does not exist") End if What is keyword driven framework.folderexists(folderPath) then Set fileObj=fileSysObj."paravalue") Next End If Syntax for how to call one script from another and Syntax to call one "Action" in another? Answer RunAction ActionName. Parameters] #1 Here the actions become reusable on making this call to any Action.in created file MyFile1. IterationRange . we pass a keyword in the test script and this keyword determine the flow of the test script.type="Microsoft Excel Worksheet" then MsgBox("This is the excel file "&FileName.FileSystemObject" ) folderPath="D:\" If fileSysObj.

like retrive name.tsr(test shared repository) script: .value(3.SetCurrentRow (2) 'get the value of 3rd coloumn of 1st sheet. Resources-> map repository parameters. If the action called by the RunAction statement includes an ExitAction statement. sheet) b) If want script then start record and retrieve the data table form 3rd row and 4th common then stop the recording the you get the script that is the scripts Answer #2 what is the extension for QTP files? Answer #5 there are 5 extns are there in QTP.1) a) That is the data table (column.4th column and place it in main script.mts(mercury test script) functions : . You can view the contents of the run-time Data Table in the Test Results window.date from data table.rows for which action iterations will be performed.mtb(Mercury test batch) Peraction Repository: . How can we perfom Action and Component parameter. abc = Datatable. Batch test:. the Run-Time Data Table displays the parameterized values that were used. Enter the row range (i. the RunAction statement can return the value of the ExitAction's RetVal argument. There u can select for action or entire test How to retrive data from a data table which is in 3rd row..write script for this.e.5 . Answer #1 'set the current row to 2nd DataTable. or enter rngAll to run iterations on all rows.vbs What is the Maximum syncronization timeout in seconds in QTP 9.. as well as any output values stored in the Data Table during the run.mtr(mercury test repository) Shared repository: . "1-7").? Answer #1 What is a runtime datatable ? Answer #2 After running a test with Data Table parameters and/or Data Table output value steps. Valid only when the IterationMode is rngIterations.

. 3. This enables the programmer to enhance his code to pre-declared standards. Advantages of Option Explicit: 1.Answer #1 20 secs. Give more reliability on data . 4.causing unexpected results when your script is run. st me out the shortcutkeys for some functionlities in the qtp for example to record . 2.. even another programmer can read the code and understand it easily than an µoption explicit¶ off document...to run . then the mistyped variable will generate an compile error describing an non-declared variable. That means one may mispell the variable name in one or more places. this will be an programming error which will give an erroneous result to end user. Clearity of the Program enhanced by proper coding rules ‡ Professionals always instruct to use µOption Explicit¶ on coding. But. Program code is easier to debug and read ‡ Programmer has clear idea about each variable he will use because he has already declared what kind of data type which will have by each variable. if you haven¶t µoption explicit¶ in your program.. Reducing mistyped variables instead of existing usable variables ‡ User may use alternate names mistakenly for already used variables. Option explicit statement is available to require explicit declaration of all variable . it is the statement which is declared during the variable declaration. Therefore. If you have µoption explicit¶... etc An sw er #1 short cut key for record is F3 short cut key short cut key short cut key short cut key short cut key short cut key short cut key ctrl+shift+F9 for for for for for for for RUN is F5 Stop is F4 Step into is F11 Step over is F10 Step out is shift+F11 insert/remove break point is F9 remove all break points is what is use of optionexplicit in variable declaration option explicit means.

importance of µOption Explicit¶ Statement has increased by providing alternative mechanisms on µOption Explicit¶ disadvantages. If you try to assign date value ³21-08-1985´ to character variable. VB assigns particular amount of memory to that variable depending on its data type. newer VB versions have integer data types in different modes ± 16 bit. the variable can fixed Range of values. potential for generating an error is much higher. 32 bit etc« . 32bits for Integer values etc« But if you are looking to allocate memory while run-time. This slows down the processing. After declaring an variable. No run-time dynamics ‡ Programmer can complete the building process as he has given and knows all the resources needed by the program to run. compiler or interpreter need to check whether the input matches the data type. and reduce any attempt to misuse a variable unintentionally. Disadvantages of Option Explicit: 1. 5. Declaring variable names and its data types and all other things take some time. Faster memory allocation ‡ When declaring variables. (That is even before he sit before an computer to code the program) 2. still we can¶t assign value which is not similar to variables¶ data type.‡ µOption Explicit´cause programmer to have more understanding on declared variables. that will reduce program¶s performance. For example. This enables the variable to have additional attention. have or the the another 3. but you may want to build several other mechanisms to track bad inputs if you didn¶t used µOption Explicit¶ 6. When assigning values to declared variables. It is not just about the coding. But. then system will automatically generate an exception or error. programmer must design it at the specification stage of the program. 7. because when we don¶t need existing value in a variable. Can implement Error detection mechanisms using data types ‡ Data types define what kind of data that can be hold by a given variable. However. Typically. if program is designing memory capacities and other things while run time. You can use this error or exception to track the user. This limits the productivity usability of a variable.

().click beacuse submit button is no more available in window Generally Object Identification is done using the physical description (Mandatory and Assistive properties) of that object in the object repository.Page. str2. check boxes? as in flight web site on flight preference page. what is the script to select 2 or more than 2 options from a listbox. choosing different flight produces trouble if from port and to port been parameterize.What is InStr() Answer a) When the use the two are more string then use # 2 instr () b) Ex: .weblist().Extendselect " " by using extend method we can select ata time two name sin list box what is smart identification in qtp? pls any give details? thanks in advance Answer Smart Identification : Its a mechanism provided by Quick # 3 Test to identify dynamic bjects whose properties are changing time to time. #3 The values for radio buttons and check boxes are ENABLE AND DISABLE.().winbutton ("submit"). But If we want to enable Smart Identification we have 2 ways. Try it by own you will get the error. ?) Think and Reply. can we parameterize radio buttons. Other than these values what else can u supply.Those values are constant. Answer I think radio buttons and check boxes can't be parameterized.If we generate the script statement Window("windowname")..( Say a Submit button changes to Save after clicking once) Now the test property of that button is changed. Answer Browser(). and runs..dialog("dialogname").This like instr (str1.Select " " # 1 Browser(). 1) enable Smart Identification for Object class 2) enable Smart Identification for a single Object If we want to enable Smart Identification for entire object class .weblist()..Page..

#1 If the game contains multi-media.gif".4 mb What is the difference between Mandatory and BaseFilter Properies.Anybody please answer me. Mow while recognising circle and rectangle. QTP does not support Multimedia support.5 supports multimedia.gif" for circle and "rectangle. we can set the file names dynamically in our code to "circle.1 square 2.Thanks in Advance Answer Mandatory properties are those property which use by # 3 QTp to recognize object od application.circle 3.2 Object Repository Size is 1..gif" for rectangle respectively what is object repository size? QTP 8. Where as in earlier versions QTP6.. Base Filter property used by Smart Identification .. then you cannon automate with QTP.rectangel)there changing at same position how to capture that) Answer We can add one square image in Object repository and let's #3 say that its file name is "square. How recognize QTP Dyanamic Image? (suppose tha wedpage contains 3 logos. Can I do Game testing with QTP tool Answer It depends on the technology and environment you are using.Go to Object Identification---> select the environment---> select the object class---> check the enable smart identification checkbox in object Identification dialog If we want to enable Smart Identification for a specific object Go to Object Repository---> select the environment---> select the object class--->select the object---> check the enable smart identification checkbox in object Repository dialog And we should select the Base Filter and Optional filter properties for the selected object class/object. When we enable this smart Identification Quick Test will try to locate the object based on these properties only.

errors. Answer Unexpected events. you may want to restart a test from the beginning. if at all. give detailed explanation about recovery scenario.. The operation(s) to perform to enable QuickTest to continue running the test after the trigger event interrupts the run session. which includes a definition of an unexpected event and the operation(s) necessary to recover the run session. and application crashes during a #2 run session can disrupt your run session and distort results. The Recovery Scenario Manager provides a wizard that guides you through the process of defining a recovery scenario. QuickTest enables you to create recovery scenarios and associate them with specific tests. Post-Recovery Test Run Option. clicking an OK button in a pop-up window. For example. Recovery Operation(s). A recovery scenario consists of the following: Trigger Event.mechanismto recognize run time object properties which change at run time How to handle Recovery scenario in QTP. or skip a step entirely and continue with the next step in the test. The event that interrupts your run session. For example. For example.reusable Structure Nd it is . what are the different kinds of frameworks in automation? Answer framework is nothing but . To handle situations such as these. and from which point in the test QuickTest should continue. Recovery scenarios activate specific recovery operations when trigger events occur. a window that may pop up on screen. This is a problem particularly when tests run unattended?the test pauses until you perform the operation needed to recover. The instructions on how QuickTest should proceed after the recovery operations have been performed. or restarting Microsoft Windows. or a QuickTest run error.

keyword driven 2.ChildObjects(oDesc) ItemCnt = oLinkCollection.counting child elements) Answer ' Create object references to the Browser and Page # 1 objects..Item(i) oLink. Set oDesc = Description.Highlight linkText = oLink.Click BrowserObj...GetROProperty("innertext") msg = "link text = " & linkText & vbNewLine oLink.modular frame work ---data driven frame work ---hybrid frame work ---key word driven frame work in the above frame works key word driven frame work is famous in the industry Give me some scripts for 1).record/playback or linearframe work (it is first generation frame work) --.. Set BrowserObj =Browser("Yahoo!") Set BrowserPageObj = Browser("Yahoo!"). types: 1. and optimized way #2 automation frame work is not a qtp feature its a third party concept and this is purely local concept "frame work may vary from company to another types of frame works --..data-driven.efficient.. Set oLink = oLinkCollection. assumptions and process developed by experts in order to perform a tasks in an affective.Sync .hybrid 4.Value = "A" ' Get a collection of links Set oLinkCollection = BrowserPageObj.Create() oDesc("html tag"). frame work is a set of guide lines.functional decomposition 3.Count-1 ' Loop through the link collection For i = 0 to ItemCnt msg = "" ' Highlight and click link i..Page("Yahoo!") ' Set a description object to identify links.. checking webpage links (counting links.opening web pages.a complex internal architecture.means end user can understand easily.

Answer It contains the following key elements: #1 1. displaying menus of QuickTest commands 3. containing buttons used while debugging .titleStr.ChildObjects(oDesc) Next ' Release the objects Set oLinkCollection = nothing Set BrowserObj = nothing Set BrowserPageObj = nothing Set oDesc = nothing Explain the QTP Tool interface.50) msg = msg & "page title = " & titleStr & vbNewLine ' Check if page load had error.Test toolbar. msg else msg = msg & "==> good link" & vbNewLine Reporter. navigating away and back destroys previous collection.Back BrowserObj. titleStr = mid(BrowserPageObj.' Read page title. "Link " & linkText.Debug toolbar."HTTP 404") > 0 Then msg = msg & "==> broken link" & vbNewLine Reporter.GetROProperty("title").titleStr. If instr(1. "Link " & linkText.ReportEvent micFail. displaying the name of the currently open test 2. containing buttons used while creating and maintaining tests 5. BrowserObj.1. containing buttons to assist you in managing tests 4. msg End If ' Navigate back to links page.Title bar.Menu bar. Set oLinkCollection = BrowserPageObj.Sync ' Rebuild link collection.ReportEvent micPass."Cannot find server") > 0 or instr(1.File toolbar.

. containing two tabs to view your test-the Tree View and the Expert View Test Details pane. . 7.when i select first item in first combobox. and Command.Status bar.in second it should be some chenai or some other item . Get all items from two combo boxes and store in two separate arrays or in DataTable. You can display the Debug toolbar by choosing View > Toolbars > Debug. If you insert a reusable or external action in a test. 8. Note: The Debug toolbar is not displayed when you open QuickTest for the first time.for ex in first combo if it is Hyderabad.. "Your convenient process" 2. the Action toolbar is displayed automatically. Global and Action. You can display the Action toolbar by choosing View > Toolbars > Action.it is not similar in the second combobox. Variables.Write a VBSCRIPT for that? Answer #3 We can do this in two ways. Hello! i am having two comboboxes. containing buttons and a list of actions.tests.Each having 10 items in it. Validate one after the other dynamically in Loop.Test pane. displaying the status of the test. 1. containing three tabs to assist you in debugging your testWatch Expressions. Note: The Action toolbar is not displayed when you open QuickTest for the first time. (The Debug Viewer pane can be opened only when a test run pauses at a breakpoint. to assist you in parameterizing your test Debug Viewer pane. enabling you to view the details of an individual action or the entire test flow..) 9. containing two tabs. containing the Active Screen...Data Table. 6.Action toolbar..

.."). first you have to install QTP after you are enable to install Add ins as ..")..getitemcount for i=1 to cmb_2_cnt act=browser(".weblist(".")."Two comboBoxes contain Different Items" Next Function cmb_2_Func() cmb_2_cnt=browser("..").act.").weblist ("....."Two ComboBoxes contain Same Item" End For End if Next End Function Is there any option in QTP to add Java add-in after instaling the QTP? Answer #1 Yes."Test is Failed".reportevent micPass.cmb_2 cmb_1_cnt=browser(".I will keep one way here which I feel Logically better 2.weblist (".page(".")..").cmb_1.")...page(".").page(".. etc. how can you describe the basic flow of automation with conditional and programmatic logic? Answer if endif for next #1 while-wend ..getitem if (act=exp) then reporter..").getitemcount for i=1 to cmb_1_cnt exp=browser("... dim exp. java.weblist("...page("..."). oracle..."Test is Passed".reportevent micFail.")...getitem(i) call cmb_2_Func() reporter.net.

0 works with QTP9..mtr in action reposirtory? Answer mtr stands for mercury test repository #2 does qtp runs on internet explorer 7.. in this case ur giving the browser name and page name if there are 100 browsers also QTP will run your script. anybody can give me answer.. But if Browser("micClass:="). i.Page("name"). local variables:it can be used ... QTP have some issues with the tabbed browsing functionality in IE7.. What is the Difference between Environment variable and Globle variable. Answer Environmental variables:it # 4 a global variable.Thanks in advance. in this case u directly declare the class to which browser belongs.0 Since qtp does not require IE to open unlike QC it really does not matter.2 does not compatible with IE 7.7.Then QTP cant work on different Browsers and Page's It depends on the way u have learnt QTP If you have testcases that worked like a sharm with QTP + IE6.0 QTP works on I.0 the same way if u record the application and play back. but does not work with QTP + IE7.Page("micClass:=").E 6. Global variables:it can be used within a test and multiple actions.0."-checkbox).2 QTP 8.. Basically QTP is independent of IE IE7.do-loop should be used to control the flow of automation What is the abbrivation of .We can is like use it in different tests and actions. Then you should try to disable the tabbed broswing functionality in IE ("Tools -> Internet Options --> General --> Tabs --> Settings" and untick the "Enable tabbed browsing.e Browser("name").

Please confirm it n then reply in case you find it nt the case.In action 1 if any error occurs control is moving to second action but if we get error in second action exitaction is throwing general run error. how u conduct GUI testing and PERFORMANCE testing on MS. e: we have 10 more actions in our test and we are using exit action command to come out from the action if any error s occured. the ExitAction cannot throw such an error and this error must be thrown by some line code before you are actually exiting the action. Please give a idea to overcome . So. Answer #1 General Error occurs whenever QTP intercepts any object which it fails to identify uniquely because the properties given by you in the code matches with many of the objects present at that time.within a test and an action. Load the Word document to its maximum pages(say more than 1000 pages) Answer #1 .WORD? and What r the GUI Test Cases and performance Test Cases? Gui Testing can be done on MS-word by following 6 standard rules of microsoft. gui test cases are 1)proper alignement of the menu and submenu 2)no over lapping of menus 3)equals sizes of all the menu items Gui testing is done manually Performance Test cases : 1.

IS IT COMES UNDER WHICH DOMAIN(HEALTH CARE OR HEALTH INSURANCE) Answer #1 it comes in Health care domain. 3. How u do the back end testing in QTP? Answer #1 To automate backend testing we can use database check point. Try to edit some line in the document and save the document .Try adding some more data to the already loaded document and see the response time for the data to get pasted on it.check the responsetime to get saved. Synchronization methods? Answer synchronization is a process of making # 5 the speed of application and the speed of QTP in sink.At this load.exist() method 4) increasing the global syncronization time Hi. there are 4 ways of synchronization 1) inserting synchronization point 2) inserting wait() method 3) using .2. If #1 the application is not behaving as .during this testing testors r checking the impact of frond end operation on backend table in terms of verification and validation You say it is a bug but developer say it is not a bug then what will you do? Answer The requirements documentation is the source of truth.close and reopen the document and test for its resposne time. 4. OUR PROJECT NAME IS: HOSPITAL CONTROL SYSTEM. 5. Try searching for a phrase in the document and check the resposne time.

rather than . How can i capture first letter of any string using QTP. 2. For ex. If a requirements change is necessary then the only the Business can approve this change.Run BrowserName What is the function of Filter in QC .specified in the requirements then it is a defect.. not the developers or the testers Hello. Like : 1. i want "j" in the below string "john" could any one explain me? Is there any function for that? Answer str="john" #1 msgbox(left(str. 3. Answer BrowserName = Browser("CreationTime:=3").pls help me..and to skip that error we opt for "on error resume next". give with a real time example. You can filter Defect entered by some person. If you want any perticular defect from 1000 logged defect list.That is If you can predict that a certain event may happen at a specific point in your test or component.GetROProperty #2 ("URL") systemutil. You can filter Status of defect. etc what is On Error Resume Next ? Answer On Error Resume Next is one of the way to # 3 handle the predictible errors while running the QTP Scripts. Answer Function of Filter in QC is to retrive the # 1 data from as per your requirement..1)) suppose i opened 6browsers and i want re-open the 4browser what is code for this. You can filter Defect Assigned to some person. 4.

.Click DataTable. Answer 'Parameterization .Value("Act_Res")="Pass" Reporter.then difficult to handle.WinButton("OK"). U will select the Languages Option Is it correct? 1.Activate Dialog("Login").exe" 'or 'SystemUtil.Click If Window("Flight Reservation").Set DataTable("Pword".WinButton("Cancel").WinEdit("Password:"). the object reposarity size is 64 mb Will QTP Support Japanese Language? Answer Whenever we want 2 test the Localization # 2 Testing.Value("Act_Res")="Fail" Reporter.ReportEvent 1..WinEdit("Agent Name:")..2 and beyound.Set DataTable("Agent_Name".exe" Dialog("Login").ReportEvent 0.how can we report the QTP test result in a different excel sheet 2. WHAT IS THE SIZE OF OBJECT REPOSITORY USING IN YOUR COMPANY there is no limit for QTP 9."Login Details"..Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a..tsr" if too bulky or large ..dtGlobalSheet) Dialog("Login")...Select "File.."Invalid Values" ."Valid Values" else Dialog("Login"). dtGlobalSheet) Dialog("Login"). Data Table (Global Sheet) for Flight #2 Reservation Invokeapplication "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a. the only thing is ".WinMenu("Menu"). But when u instal QTP. QTP support Japanese and English languages.depending on a recovery scenario.."Login Details".Exit" DataTable. there will be multiple redundency in large OR (object repository).Exist then Window("Flight Reservation")..

When you parameterize the object if you don't split into actions the whole test will run that many iterations.How to convert this format to 01-01-09? Answer It's very simple question. We can't set particular action to run but we can specify how many time the particular action should run. This can be done by selecting the action and right click and select the action call property and make sure the run tab is selected and in that you can specify how many times the action should run. example-date format is 01-jan-09 in QTP.Value("Remarks")="Defect" End If DataTable.Value("Remarks")="OK" Else DataTable.Splitting the action is useful especially when we parameterize the object.xls") Note: Create a data table in QTP and enter the following details Agent_Name Pword Act_Res Exp_Res Remarks puneeth mercury Pass pooja mercury Pass soumya mareiou Fail mahesh miaoreu Fail shivakumar mercury Pass hi testers.one script has three actions . at the of running three actions are running . no need to write all the . how to set run only perticular action and what is the use of split the action? when it will be useful? Answer #2 Hi. each time you run it'll run the whole test. If you don't split the test in to action.dtGlobalSheet) If Strcomp(er. which is the waste of time and efforts.dtGlobalSheet) ar=DataTable("Act_Res".ar)=0 Then DataTable.Export("D:\QTP9\LoginResults.End If er=DataTable("Exp_Res".

Please convert the given value into date format by using the CDATE Function val = "01-jan-09" Conv_Val = cdate(val) msgbox Conv_Val Result : "01-01-2009" WHAT ARE THE SHORTCUT KEYS IN QTP? Answer #1 record purpose to run the script get newpge to save the script to open test : f3 :f5 :ctrl+n :ctrl+s :ctrl+o nswer #2 object repository ctrl+r for comment ctrl+m for uncomment ctrl+shift+m .#7 excessive code.