Professional Documents
Culture Documents
Can any one tell me how to create the shared object repository
Ans: hi this is susmitha,object repositary means it is a storage place where one can stre the
object information and it behaves like an interface b/w application and the test script.where in
the shared repositary we can store more than one application s objects informationit can be
associated with multiple test scripts.the maintainance is easy but it takes more time while
running.open OR--> eport--->specify the name to store the objects as shared like .tsr file that
is test shared repositary ---->save and ok i think u understoodmadhav_sus@yahoo.co.in
OR
I am new to QTP9.0, can anyone tell me how to create shared object repository
Q. Difference between action and function
Ans: Action:
Function:
OR
Action is a thing specific to QTP while functions are a generic thing which is a
feature of VB Scripting. Action can have a object repository
associated with it while a function can't. A function is just lines of code with
some/none parameters and a single return value while an action can
automation script i.e. a function like getting a string between to specific characters,
now this is something not specific to QTP and can be done on
pure VB Script, so this should be done in a function and not an action. Code specific
to QTP can also be put into an function using DP. Decision of
Ans: hi
upto my knowledge it's not possible, because qtp is mercury interactive product and ration
robot is other product, qtp supports winrunner scripts...
Q. hi friends plz tell me the script to stop an iteration and start from
the next iteration?
Ans: hi
bhadra
Q. Hi friends, how to get a value from a text box during run time and
parameterize it to another step?
Ans: You will need to use an output parameter to get the text from the textbox and then use
an input parameter to input it where you need it.
You also may as well use a the data table in your expert view.
Ans: Here is the answer for how to run DOS command in QTP..Hope this will be useful fro you.
You can run standard DOS commands in your QuickTest test using the
you can open a DOS command window, change the path to C:, and
Dim oShell
(choose Help > QuickTest Professional Help > VBScript Reference >
VBScript).
OR
hello everyne,
i m using the window object in qtp and i want to pass the window name as an argument which
is stored in a variable.
like:
window("arg1").window("button").close
i m unable to write a syntax for passing arg1(window name) in the code in QTP.
thanks,
rosy
OR
Try This,
arg1="my window"
window(arg1).winbutton("ok").click
What ever the functions(one or many) you would like to write create in the notepad and save
it as filename.vbs.Go to your test click on the testsettings in the TEST tab. Again go to the
resources tab and click on the +(plus appears in green color) symbol and give the absolute
path or u can browse.In the script where ever you want call using CALL funcName(parameters
list).
OR
You are upsolutely correct.Also if you want to execute file Execute file and path name
Ex:Execute File C:Program FilesMercury InteractiveQuickTest ProfessionalTestslibrary1.vbs
Q.How do you close the Task Manager through QTP?
Ans: First you should add the Task Manager dialog box in the object repository.
This is not a modal dialog box so you can add it to repository easily.
Then use following simple code.
regards,
Purna
Q. How to capture data from images in QTP and produce them in Excel
sheet ?
Ans: select the cell in data table and right click,select import.
Q. how to capture the window in qtp while writing script and it should
run while running script
Ans: hi
there are two way to handle this situation, one is you have to add the objects to object
repository before going to run, second is you have to use descriptive programming, OK
Ans: Hi,
We have option for comparing the Excel Sheets. For generataing macros we compared.
And another one option is, using if condition we compare the two cells, and apply for the
whole.
Thanks
Barna
run scripts;
in addtion to this u need to enble check box to allow other mercury products to run tests and
components in run options from tools menu
OR
hi
u can use test batch runner from tools option or u can create one action then go to where u
created the action(i mean source) there u can find action0, open that file in notepad there u
can write which actions you want to execute sequentially, it is like call to existing action
bhadra
Ans: hi,
dim con,rs
set con=createobject("adodb.connection")
set rs=createobject("adodb.recordset")
You can measure how long it takes to run a section of your test by defining transactions.
----
Sudarshan
OR
yes, we have u can get that from using start transaction and stop transaction and then you
will find the difference of two transactions, you can get time for entire test or for sub test or
for actions....so on.....
bye
bhadra
We can also calculate the time using method called Timer.
Q. List the browsers QTP supports
Ans: hi
it depends upon qtp version, because qtp 8.2 supports till internet explorer 6.0, it will not
support internet explorer 7.0, to work with i e 7.0 we should have qtp 9.0, apart from qtp
supports aol,netscape,internet explorer only. for further information see help menu in qtp.
OR
OR
hi
thank u .
ok takecare byeee
byeee
please add the properties again to the OR and execute the script
Q.
QTP | Question 361 of 449 | Print | Send To Friend
QTP and CITRIX terminal server Access question
Ans: I need to automate tests on a inhouse built application. This application can be accesed
through CITRIX terminal server. How can I connect to this server via QTP and access the
application.
Is there any special add-in required or functions I need to call? Any kind of help is
appreciated. If you could point me to any material that might help will also be very helpful
Thanks in advance
OR
Hi, CITRIX is like a different platform, if u want to record or develop any scripts in CITRIX
using QTP you need to install QTP in the CITRIX server, and in u r local machine u install
CITRIX Neighbour wood.
Q.Suppose in 1st Action we had two variables , Can we able to call
that variables in Second Action
Ans: Yes, we can call the variables by that variable as "option Explicit".
Regards,
Vamsi.
OR
hihow u call the first function variable to ur 2nd function, declare that variables outside for all
the functionsor call second function in the first function itself.FIRST SCENARIOvar a =10var
b=20function addres=a+bend functionfunction SUBres=a-bend functionSECOND SCENARIO
FUNCTION RESa=50,b=60 res= ADD(a,b)res=sub(a,b)end functioni think u
understandmadhav_sus@yahoo.co.in
OR
Hi,you can either use Action parameters(output parameters) to pass values between 2 actions.
or even better solution is to use environment variables.define 2 environment variables in
Settings - > environment tab as user-defined variables.lets call it EnvVarA and EnvVarBin
Action 1, you can user statementsEnvironment("EnvVarA") = "variable 1"in action 2, you can
use it to retrieve value stored in action1such as x = Environment("EnvVarA")this should help
OR
u need to add the variables in input parameters in seocond action and output variables in first
action.
u can call the 1st action variables in second action by using Variable1 =
Parameter.Item("1Variable")
Q. What are checkpoints in QTP and its importance.
You can add eight types of checkpoints to your test for standard web objects
using QTP.
b).A text checkpoint checks that a text string is displayed in the appropriate
place on an Application.
f).An Accessibility checkpoint checks the web page for Section 508 compliance.
g).An XML checkpoint checks the contents of individual XML data files or XML
documents that are part of your Web application.
OR
hi
1.standard checkpoint: it will useful to check the object properties as well as works as
6.accessibility checkpoint: for web applications only, is the web application follows www
consortium rules of section 508 or not,
bhadra
Descriptive programming is a technique by which we can perform actions on objects which are
not in the object repository.
The below example uses descriptive programming to login to an application by providing the
user id and pwd
Dim uid,pwd
Dim objPropBrowser,objPropPage
Dim objPropImageLogin,objPropWebEditUsrName,objPropWebEditPwd
uid="abc"
pwd="123"
objPropBrowser("name").value="Login"
objPropBrowser("title").value="Login"
'objPropPage("name").value="root"
objPropPage("url").value="url link"
objPropPage("title").value="Login"
objPropWebEditUsrName("name").value="username"
objPropWebEditUsrName("type").value="text"
objPropWebEditPwd("name").value="password"
objPropWebEditPwd("type").value="password"
objPropImageLogin("name").value="Image"
objPropImageLogin("image type").value="Image Link"
objPropImageLogin("alt").value="Login"
objPropImageLogin("abs_x").value="510"
objPropImageLogin("abs_y").value="334"
objPropImageLogin("x").value="510"
objPropImageLogin("y").value="241"
Browser(objPropBrowser).Page(objPropPage).WebEdit(objPropWebEditUsrName).Click
Browser(objPropBrowser).Page(objPropPage).WebEdit(objPropWebEditUsrName). Set uid
Browser(objPropBrowser).Page(objPropPage).WebEdit(objPropWebEditPwd). Set pwd
Browser(objPropBrowser).Page(objPropPage).Image(objPropImageLogin).Click
Dim uid,pwd
uid="abc"
pwd="123"
Browser("title:=Login","name:=Login").Page("title:=Login").WebEdit("name:=username","typ
e:=text").Set uid
Browser("title:=Login","name:=Login").Page("title:=Login").WebEdit("name:=password","typ
e:=password").Set pwd
Browser("title:=Login","name:=Login").Image("name:=Image","file name:=b-login.gif").Click
Q. what is the difference between Call to Action and Copy Of Action in
QTP. Why are they used.
Ans: When you want to use a reusable action without making any change in the code
then you should use 'Call to existing action'.
But if you want to make changes in the reusable as per your requirements then ypu should
call 'Call to copy of an action'.
OR
hai,
there is diff in these actions.we use this actions in modular framework. these are reusable.in
call to existing action we canot make change or customize script as u wish.if u dont clear once
u see call to existing action keep cursor and try to add ,u canot. but in call to copy action u
can in which ever way u want
Q. What is the standard time taken to find a defect using QTP?
Ans: hi
there is no specific time to find a defect using QTP, it depends upon the project and defects,
OR
It all depends on the synchronisation time set for the particular script.
OR
It depends on object repository type
Regards
Bindu Dey
Q.when we save any test it will automatically save as folder which are
the files generated in it?
Ans: hi
the folder consists of action 0, action 1,.mtr and other files which is useful to retrieve the test
when you call it, ok
OR
test folder contains datatable,lock file,parameters file and action0, action1 folders. these folder
contain object repository file as .bdb,Script file as .mts, and resources file as .mtr
Q. After I installed IE 7.0, My scripts are failing, Suggest me How to over come this problem?
Ans: You did not mention the QTP version that u r using.
U need to install QTP 9.0 or the latest version 9.1 which is certified with IE 7.0.
Ans:
You can teach Quick Test to recognize any area of your application as an object by defining it
as a virtual object. Virtual objects enable you to record and run tests on objects that are not
normally recognized by Quick Test. Using the Virtual Object Wizard, you can map a virtual
object to a standard object class, specify the boundaries and the parent of the virtual object,
and assign it a logical name.
Q. can anybody give me the script for inserting data into a table of access through qtp
MsgBox "connected"
strSQLCustomers = " Insert into OrderTable(Customer_Name) values ='" & param1 & "'"
Cnxn.Close
End function
QTP Script -
------------
OR
needed complete Qtp framework and diffe types of framework we have in QTP
OR
i am a new entry
Dialog("Login").Winedit("UserName").set "UserName"
Dialog("Login").Winedit("Password").set "EncriptedPassword"
Dialog("login").winbutton("ok").Click
OR
All the members explained their views only for windows based appli...
Here i'm gng too explain abt Web bases Login form:
Rgds,
Anees
Dim Conn
Dim Conn2
Dim rs
Dim rs2
Dim Sql
Dim Sql2
Set rs = CreateObject("ADODB.Recordset")
rs.close
rs1.close
conn.close
conn1.close
set rs=nothing
set rs2=nothing
set conn=nothing
set conn2=nothing
Ans: The following example is used to identify numbers in the input givenSet reg=new
regexpreg.pattern="d+"reg.global=truereg.ignorecase=trueSet m=reg.execute("This is India
2006 and I am proud to be an INDIAN 999")For each n in m msgbox n.valueNextEven regular
expressions are used in check points and string replacing functions.
OR
The following code illustrates how to obtain a SubMatches collection from a regular
expression search and how to access its individual members:
-----------------------------------------------------------------------
----------------
The following code is for Regular expression illustrates the use of the Pattern property.
Q. Can u write a sample code of Descriptive progamming for yahoo login form?
Ans: This is the code for Yahoo Photos Website you can do the same for the yahoo by
changing the values in the required places.CODE: Browser("title:=Yahoo!
Photos*.*").page("title:=Yahoo! Photos*.*").WebEdit("name:=login").set "srinivas"
Browser("title:=Yahoo! Photos*.*").page("title:=Yahoo!
Photos*.*").WebEdit("name:=passwd").set "test"Browser("title:=Yahoo!
Photos*.*").page("title:=Yahoo! Photos*.*").WebButton("name:=Sign In").click
OR
Hi Srinivas,
If you have any documents related to "Descriptive Programming", Can you please send those
documents. I am in urgent need of that document.
Thanks in Advance,
Prasanna Laxmi
OR
HI,
OR
yes,we can
record and save scripts in wr after we run it .save corresponding gui file also
this will insert a test script in qtp as TSL Test.runtestEx"tsl btest path",t/f,t/f
OR
You can insert a call to a WinRunner test using the Call to WinRunner Test
Ans: Yes.
1. Per-Action repository mode: In this, for each action a seperate object repository file is
created. So object1 in Action1 is different from the same object1 in Action2. So it is wastage
of memory. And each object repository file is saved when a test is saved. This mode is most
useful, when the object does not change frequently and a few actions are associated with the
test. If the object changes in the application, then we need to changed each of the object
repository.
2. Shared object repository: In this, common object repository file can be used for muliple
actions and multile tests. So Object1 is action1 is same for Action2, because all the objects are
saved at one place. Here if the object changes, then we need to update a single object
repository file.
OR
HOW DO YOU READ A .TSR FILE. i MEAN HOW DO YOU READ THE SCRIPT . dO YOU OPEN THE
.TSR FILE IN NOTEPAD ELSE...
CHEERS
CHAKRI
Ans: Action:
Function:
OR
Action is a thing specific to QTP while functions are a generic thing which is a
feature of VB Scripting. Action can have a object repository
associated with it while a function can't. A function is just lines of code with
some/none parameters and a single return value while an action can
automation script i.e. a function like getting a string between to specific characters,
now this is something not specific to QTP and can be done on
pure VB Script, so this should be done in a function and not an action. Code specific
to QTP can also be put into an function using DP. Decision of
using function/action depends on what any one would be comfortable using in a
given situation.
Ans: hi
upto my knowledge it's not possible, because qtp is mercury interactive product and ration
robot is other product, qtp supports winrunner scripts...
bhadra
Q. Hi All,
In Qtp how to get text available in html frame.
Thanks
Senthilkumar
Regards,
Shiva.P
Q. hi friends plz tell me the script to stop an iteration and start from the next iteration?
Ans: hi
bhadra
Q. Hi please give me the steps to record Java application in QTP 8.2? Please give detailed
steps?
Ans:
2)Set the reqired properties for objects to identify the objects in Tools..>Object
identification(Mandatory and assistive properties)
OR
Hi Santosh,
First of all we cannot add the same properties in both. They must be different.
I have added all the properties to Mandatory. But its a bit of confusion that to whom i should
assign the properties.
Still it is not recording the Java application. There are tabs, check boxes, buttons in the
application , which are not recorded! in QTP
The other way is if i click on Low level recording then it records all the things. Which i think is
not a rite way.
Please guide
Ans: If the task is to find a three digit number in given input the following code works
Ans: You can add action using the command: RUN ACTION action name,[Iteration name,
Iteration range]. But it won't work untill you call the copy of external action from the menue
bar,to call the objects associated with that called actiuon.
Q. How can i get all values of a single column into an excel sheet(in different rows)??
Ans: DataTable.GetRowCount : Returns the total number of rows in the longest column in the
first sheet in the run-time Data Table (global sheet).
Write steps to connect with the database in Expert View,define your database and tables, once
you are connected with the database you can update the data.
OR
Hi,
1)configure first two tab of ODBC settings to the respective SQL server
2)QTP->Insert Database checkpoint and click on create button-> and config the database to
which u need to run the query...
Thxs
Sanjeev
OR
Ans: Hi,
You are not clear in your question. First tell me whether it is the window based or web based
application.
When you are using QTP first add .net add-in available with mercury site ( free) and then start
doing .
give the path of the .exe file in the windows tab of the recrord and run settings and do the
rest of the work like any other application.
Note : after adding the .net add-in you amy not find the .net tab in the record and run settins.
give the path of the url in the web tab of the record and run settings. and do the rest lik all
other web applications
regards
Srikanth N.
Ans: yes u can connect through DSN.( create DSN from control panel).And create bd
copnnective object like, set dbconnect= createobject("ADODB>connection"). and
checkdbcfonnection.open is true or not.
Ans: Hi you can use the following code to dynamically load the O.R
Set Apps=createobject("quicktest.application")
Apps.Test.Settings.Resources.objectrepositorypath="ObjectRepositoryPath"
Set Apps=nothing
Regards,
Satish
OR
Ans: We can make function libraries by wirting VB script functions in the ".vbs" file. We can
reuse this vbs functions in the QTP by adding this file in the settings.
OR
Just write your code in a .VBS file in any text editor.Add the following code in your test (in
expert view obviously)ExecuteFile "your VBS file path"for exampleExecuteFile "c:My
projectValidationQTPLibrariesMyLybrary.vbs"ExecuteFile "[QualityCenter] FolderBPT
ResourcesLibrariesMyLybrary.vbs"or, a simple text file can workExecuteFile "c:My
projectValidationQTPLibrariesMyLybrary.txt"
Ans: hi,
OR
Hi my Friends ,
There are many kinds of framework.
2:-Moduler Framework
and many more are there .for more inforamtion u can mai me at Manubasur1@rediffmail.com.
OR
Hi,
Ans: QuickTest Professional enables you to merge two shared object repositories into a single
shared object repository using the Object Repository Merge Tool. You can also use this tool to
merge objects from the local object repository of one or more actions into a shared object
repository.
You can update a shared object repository by merging local object repositories associated with
actions in one or more tests into the shared object repository. The objects that are merged
from the local object repositories are then available to any actions that use that shared object
repository in any tests.
In the merge process, the objects in the local object repository for the selected action are
moved to the target shared object repository. The action then uses the objects from the
updated shared object repository.
Ans: Hi,
Do the following
1)go to Control panel and in that "administrative tools" and click on "ODBC Data Source".
2)Click on Add
5)Give the dsn name in the name field and description is optional.Give the server name
..server name is the name (system nameSQLEXPRESS)which it displays when you connect to
the sql server where you have server autentication.
6)click on next
7)select the radio button with sql server authentication with login username and password
8)Click on Next , if the username and password is correct then it connects otherwise it
displays an error message.
9)check on the "Change the default database in order to select the database" for which you
want to create DSN.
While creating a database checkpoint "click on the Connection string" and select the DSN
name which was created recently.
OR
Can you please tell me how to connect to the Database where I am using IBM DB2.
run scripts;
in addtion to this u need to enble check box to allow other mercury products to run tests and
components in run options from tools menu
OR
hi
u can use test batch runner from tools option or u can create one action then go to where u
created the action(i mean source) there u can find action0, open that file in notepad there u
can write which actions you want to execute sequentially, it is like call to existing action
bhadra
Q. How to identify an object whose name changes with time?(that includes seconds also)
if the name of the edit box is given in the above code we can access the edit box
Ans: Hi,
Cheers
Suresh Babu.L
OR
Hi,
Cheers
Suresh Babu.L
OR
Hi,
Cheers
Suresh Babu.L
Hi,
here we go:
Filename = "c:x.xls"
MyWorkSheet = "[test$]" 'special syntax, sheet name is test
msg = ""
for j = 0 to rsExcel.fields.count -1
msg = msg & rsExcel.fields(j).name & " "
next
msg = msg & vbcrlf
msg = msg & vbcrlf
Q. how to place values in QTP data table from weblist at run time?
Ans: Using output values we can view the values that applications are taking during run time
OR
hi komali,
using output values all the values of a weblist are stored in a single cell of the datatable. The
values are seperated by ";" . In this case if we want to use 1 value at a time then how do we
separate that value from the entire list . I hope you got my point.
thanks in advance,
ritika
Q. How to record the scripts using the lowlevel recording, analog recording.
Ans: When we need to record Key board or mouse events go for analog recording
Ans: QTP 9.0 includes the facility to remove (or add) blocks of comments
Ans: we can the run batch process through test batch runner
go to test batch runner ->click test bach runner->click add button ->add the test script and
run the scripts
OR
You can use Test Batch Runner to run several tests in succession. The results for
each test are stored in their default location.
Using Test Batch Runner, you can set up a list of tests and save the list as an .mtb
file, so that you can easily run the same batch of tests again, at another time. You
can also choose to include or exclude a test in your batch list from running during
a batch run.
Notes:
To enable Test Batch Runner to run tests, you must select Allow other Mercury
products to run tests and components in the Run tab of the Options dialog box.
For more information, see Setting Global Testing Options.
Test Batch Runner can be used only with tests located in the file system. If you
want to include tests saved in Quality Center in the batch run, you must first save
the tests in the file system. Components cannot be used with Test Batch Runner.
You can stop a test batch run at any time by clicking the Stop button.
1. Choose Programs > QuickTest Professional > Tools > Test Batch Runner
from the Start menu. The Test Batch Runner dialog box opens.
2. Click the Add button or choose Batch > Add. The Open Test dialog box
opens.
3. Select a test you want to include in the test batch list and click Open. The
test is added to the list.
4. Repeat step 3 for each test you want to include in the list. By default, each
test selected is added to the bottom of the list.
To insert a test at another point in the list, select the test that is to precede the test
you would like to add. When you add the test, it is added above the selected
test.
To remove a test from the list, select it and click the Remove button, or
choose Batch > Remove.
If you want to include a test in the list, but you do not want the test to be
run during the next batch run, clear the check box next to the test name.
5. If you want to save the batch list, click the Save button, or choose File >
Save, and enter a name for the list. The file extension is .mtb.
6. When you are ready to run your test batch, click the Run button or choose
Batch > Run. If QuickTest is not already open, it opens and the tests run
sequence begins. Once the batch run is complete, you can view the results
for each test in its default test results folder (<test folder>res#report).
For more information about Test Results, see Analyzing Test Results.
Click on Test->Settings.
Once you have saved a test with per-action type, you cannot change it to shared.
OR
Click on Test->Settings
Once you have saved a test script with per-action type of object repository you cannot change
it to shared.
OR
I would like to know is there any function to be written to include 2 different Object repository.
If yes can i have the script.
OR
You will need to upgrade to QTP 9.0 to maintain separate object repositories
Q. How to use Regular Expression in QTP?Woluld appreciate if you explain with an example?
Ans: QTP comes with extensive help for regular expressions with many examples.
Suppose we want to regularise an expression which has only digits and can contain a
maximum of 2 digits, the expression will be [0-9][0-9]
Now the question arises - how and where to implement this. Suppose an object is recognised
by qtp with index 45 in OR. This can change everytime a new instance of IE is created. Its
advisable to use regular expressions at such places.
Similarly if we want to regularise characters in suppose text property, use .* to make any text
acceptable in this property.
The more you do R&D on this topic, more you'll be comfortable with this. Try to regularise as
many expressions as you can using reference material given by QTP. It'll be of great help. I
hope this helps you to start.
OR
You can Import local sheet by Importing the sheet from excel sheet. You can import any sheet
from any action, best approach to import all the required sheet at same time at the begining
of the test.
You can use the same syntext that you use for the global sheet
For example
Q. How to work with Insert Output Value, Insert Bitmap, Insert Accessibility
Ans:
specific point in your test or component and stored for the duration of the
run session. The values can later be used as input at a different point in the
run session.
BitMap Checkpoints
creating a test or component, you specify the area you want to check by
selecting an object. You can check an entire object or any area within an
checkpoint in the test or component. You can also choose to save only the
selected area of the object with your test or component in order to save disk
space.
When you run the test or component, QuickTest compares the object or
application with the bitmap stored when the test or component was
object and displays it with the expected bitmap in the details portion of the
Test Results window. By comparing the two bitmaps (expected and actual).
1 Choose Insert > Checkpoint > Bitmap Checkpoint or click the arrow beside
Accessiblity Checkpoint:
Accessibility Checkpoint identifies areas of your Web site that may not
for every non-text element. You can add an Alt property check to check
whether objects that require the Alt property under this guideline, do in fact
Q. i want code for datadriven testing for 10 iterations in qtp. ex take usename and pwd .
dialog("login").winedit("username").set datatable("columname",dtglobalsheet)
dialog("login").winedit("Password").set datatable("columname",dtglobalsheet)
Next
OR
you need to verify whether the add-in which supports the application is installed in QTP or
not.
Q. if the the two object have same class then how qtp will find the object
Ans: ur question is 2 ojects have same default properties then how qtp recognizes to those
objects right
if this is the question, then if u want to know the unique property that is what developers
defined to those objects while coading just spy on those objects to see what properties the
object have then select the unique property and add that property and also in qtp there is one
properrty called smart identification. enable this property then while running, if there is no
unique property in the default properties then qtp checks in the assitive properties and it will
give an warning message int he test results window like i learned this object with this assistive
property if u want to add that property to ur default property then u can add.
Q. In QTP how many types of data tables are available and explain the same.
Action is local per specific action only u can use that data.
Action
OR
two types
Q. is it necessary to learn VB script to work with QTP or we can manage with keword driven
Ans: Hi,
It's not mandate that one should mastered in Vb script to workwith QTP.It is mostly user
friendly and for good results we need to have basic VB or concepts which will suffice.
Prasad
OR
Well, I think VBscript knowledge is a must, if you want to excel in QTP. for a starter , keyword
driven approach is good. but you don't want to stop here, do u?
OR
Only with Record and Playback it wont be doing automation testing in QTP, other than that
enchancing the script with
Q. Is there a way to run QTP scripts from commandline without opening QTP
Ans: We can run qtp scripts without opening the qtp, in QTP they have provided one option
called the silent test runner. by using this we can execute
OR
But The silent test runner will not run scripts from the command line?
OR
U can run QTP script from the command line
wscript "<filepath.vbs>"
First create .vbs file , in that specify your test path name.
Q. Is there any options available to handle more than one DataTable Simultaneously in QTP
1. Local data sheet(For each script u can create ur own data table)
2. Global datasheet(For the entire application u can use only one global datasheet.)
Q. Is there any way to convert .tsr (Object Repository) File to an XML file?
OR
Ans: For testing Java Objects you need to install an additional Java Plugin. This will
enable QTP to identify java objects. This should also solve the java tree problem.
if you already have installed the java plug-in and asking for a method to test java
tree objects, there is no single answer i can give. but you might have to apply your
own logic through descriptive programming.
OR
Hi
I have installed java plugin object and have tried to give a call to the java object tree
please can you send a small sample code which tests the Window explorer
regards
Prashant
Q. Please provide complete walk through for creating the Shared Object repository in QTP
Ans: One can create a shared Object repository path in two ways either manually or
programmatically
.......satish
You can add eight types of checkpoints to your test for standard web objects
using QTP.
b).A text checkpoint checks that a text string is displayed in the appropriate
place on an Application.
f).An Accessibility checkpoint checks the web page for Section 508 compliance.
g).An XML checkpoint checks the contents of individual XML data files or XML
documents that are part of your Web application.
OR
hi
1.standard checkpoint: it will useful to check the object properties as well as works as
6.accessibility checkpoint: for web applications only, is the web application follows www
consortium rules of section 508 or not,
bhadra
Ans: 1)Difference in winrunner there is no command to comment the block where is in qtp9.0
command is clt+m
OR
Hi Everybody,
Active Screen Future is there by that while preparing script that perticular line shows proper
Screen shot in Active Screen by that ,it will be is understand for updating scripts.
Loarunner 8.0
QTP 9.0
OR
For TD the latest version is Test Director 8.0 (Quality Center)
OR
Thank you very much manas, i would really appreciate if you give me this answer with real
example.
OR
enhaced means inserting the cheekpoints or writeing conduction statements in the script and
run the script and enhace the results with actual and expected
OR
in qtp developing a basic script means first of all we r writing code or test script that which
performs basic operations apart from testing functionality like issues. then we enhance it by
inserting checkpoints or using conditional statements/loops/methods/synchronization
points/parametrization etc
OR
5. Using the Data Table or Flat files for the passing the runtime values
Ans: You can use "Call" function to call any function with the script or from .VBS and .txt files.
Like
Call ABC(Parameters)
Ans: QTP Provides an option to include Add-Ins/Controls according to our application.SO if the
application contains any Activex objects QTP identifies those using this ActiveX control.
Ans: Vbscript does not recognises or read the flat files like notepads etc. We create an object
which is called 'file system object' which contains flat files. From that file system object we can
retrieve values and can apply on test.
OR
file system object is a qtp predefined object that which can allow user to access to external
files and allows to perform different oprations like reading data from files, writing/appending
data to file, opening/creating/removing a file etc by using different methods of file system
object.
Ans: Input parameter can be used with functions and procedures that which can be used to
pass the input values from the calling test to perform the function/procedure's action
output parameter can be used with functions to return the value to main/calling test
OR
Descriptive programming is a technique by which we can perform actions on objects which are
not in the object repository.
The below example uses descriptive programming to login to an application by providing the
user id and pwd
Dim uid,pwd
Dim objPropBrowser,objPropPage
Dim objPropImageLogin,objPropWebEditUsrName,objPropWebEditPwd
uid="abc"
pwd="123"
Set objPropBrowser = Description.Create
Set objPropPage = Description.Create
Set objPropImageLogin = Description.Create
Set objPropWebEditUsrName = Description.Create
Set objPropWebEditPwd = Description.Create
objPropBrowser("name").value="Login"
objPropBrowser("title").value="Login"
'objPropPage("name").value="root"
objPropPage("url").value="url link"
objPropPage("title").value="Login"
objPropWebEditUsrName("name").value="username"
objPropWebEditUsrName("type").value="text"
objPropWebEditPwd("name").value="password"
objPropWebEditPwd("type").value="password"
objPropImageLogin("name").value="Image"
objPropImageLogin("image type").value="Image Link"
objPropImageLogin("alt").value="Login"
objPropImageLogin("abs_x").value="510"
objPropImageLogin("abs_y").value="334"
objPropImageLogin("x").value="510"
objPropImageLogin("y").value="241"
Browser(objPropBrowser).Page(objPropPage).WebEdit(objPropWebEditUsrName).Click
Browser(objPropBrowser).Page(objPropPage).WebEdit(objPropWebEditUsrName). Set uid
Browser(objPropBrowser).Page(objPropPage).WebEdit(objPropWebEditPwd). Set pwd
Browser(objPropBrowser).Page(objPropPage).Image(objPropImageLogin).Click
Dim uid,pwd
uid="abc"
pwd="123"
Browser("title:=Login","name:=Login").Page("title:=Login").WebEdit("name:=username","typ
e:=text").Set uid
Browser("title:=Login","name:=Login").Page("title:=Login").WebEdit("name:=password","typ
e:=password").Set pwd
Browser("title:=Login","name:=Login").Image("name:=Image","file name:=b-login.gif").Click
Ans: hi samuel,
Object repository in qtp is like a storage place or a central repsitory where it stores the
properties of all the objects when u reocrd the script,and later when u execute the script qtp
checks that the objects in the application match the objects in the object repository and
executes it, if both the objects matches the test will pass, if it cannot identify the object or
there is a mismatch the script will fail.
Object repository is same like a GUI map in winrunner where u have to make the tool capture
the properties of object where as in QTP object repository automatically does that for u.
thanks,
aparna.
Ans: Object Spy:If you need to know the Properties of Field or an object(Edit Box) in your
application you may click on Object Spy and select the object for which the properties are to
be known...We generally use Object Spy in order to compare the properties of an object in the
application with respect to the Test script.
Object Identification:Object identification is a section where you customise all your properties
by which QTP checks for the Mandatory and Assistive Properties of an object.
Ans: Environment variable is a variable with their corresponding value. Quick Test can insert a
value from list of environment variable list. Throughout the test run, the value of an
environment variable remains the same, regardless of the number of iterations, unless you
change the value of the variable programmatically in your script.
• User-Defined Internal—variables that you define within the test. These variables are
saved with the test and are accessible only within the test in which they were defined.
• User-Defined External—variables that you predefine in the active external
environment variables file. You can create as many files as you want and select an
appropriate file for each test, or change files for each test run.
• Built-in—variables that represent information about the test and the computer on
which the test is run, such as Test path and Operating system. These variables are
accessible from all tests and components, and are designated as read-only.
Ans: Hi
Q. what is sync point in QTP? and how to insert sync point in QTP can anybody tell me step by
step
Ans: hi
you mean sychronization point it means waiting property till page is loaded.
Ans: hi,
Context sensitive recording means we can perform the events on standard GUI objects.
Ans: Out values are created inorder to run the script without any fail for the dynamically
changing values.
for example if u take the flight application when you parameterize the test with different sets
of data in the data table, the price changes for each trip so in order to identify the price
change and to run the script accordingly we create output values.
After running the script u can see the output values(price)for different destinations in the run
time data table.
thanks,
Q. can anyone tell me wats the advantage of using a third party Tool like QTP for testing the
SAP application?
Is the inbuilt tool of SAP VIz eCATT does all the testing that are done through QTP? Tell me
the Advantage of using QTP in SAP applications?
Ans: If SAP is the only technology for the business and which database using by u(if more
than one database using) then QTP will supports all the databases.
QTP is having more felixibility to write a script for any technology by using the add-ins.
ie we can write the scripts for sap or any web based application and it is more user friendly.
So we can fine more man power and highly skilled resource will be available.
Q. Hello,
I'm using QTP 8.2. and I want to test an Application which is designed with Oracle Forms 10 g.
Before installing the Oracle Addin for QTP 8.2. I was able to open the Application with QTP and
IExplorer 6.0.
After Installing the Oracle Addin for QTP 8.2. I wasn't able to open the Application neither with
QTP nor ÍExplorer.
I only installed the Addin. I haven't installed any upgrade or patch!
The following failure is shown in the JAVA Console after starting the application:
at oracle.forms.engine.FormsDispatcher.initConnection(Unknown Source)
at oracle.forms.engine.FormsDispatcher.init(Unknown Source)
at oracle.forms.engine.Runform.initConnection(Unknown Source)
at oracle.forms.engine.Runform.startRunform(Unknown Source)
at oracle.forms.engine.Main.createRunform(Unknown Source)
at oracle.forms.engine.Main.start(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
It would be more than nice if someone could help me with this problem
Ans:
This problem occurs due to a conflict between java and oracle enabled support
OR
Hello,
The other solution won't work, this one does. I experienced some
problems with my existing scripts(recorded with the 6.5 Oracle add-in)
because some objects aren’t recognized properly anymore. I adjusted
the scripts and now it works well.
Solution:
2. In the ‘Oracle Add-in for QuickTest’ key change the value of ‘Enabled’ from
1 to 0
OR
The only problem with this fix is if you are really wanting to use the Oracle Add-in with your
application the suggested fix "disables" the Oracle Add-in. In my case, I was receiving the
same error but when I disabled the Oracle Add-in I could not record in QTP using that specific
application. To fix the problem, I went out on the Mercury Website to their Knowledge Base
and found a "Patch" which adds support for Oracle Forms 10g/9i (also known as Oracle Forms
9.x) to the QTP Oracle Add-in 8.2. It is Patch # QTPORACLE82P6102, but you have to request
that they send it to you. Maybe this will help.
OR
Hi Frns,
Thanks to all.Even I got the same problem.
After installing java and oracle add-ins my application could not open.
My application is built with oracle 10g forms and java.
After modifying the value for Enabled from 1 to 0. then Could work on applicaiton. and qtp 8.2
is able to recognize.
Q. Hi All,
my code is:
browser("B1").page("P1").WebEdit("Login").Set "Admin"
myObj = "Login"
browser("B1").page("P1").WenEdit (myObj).Set "Admin"
Ans: Hi
I don't find any problem with your script. I tried to run the same sort of script in my
system I didn’t find any errors.
login = "username"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury
Tours").WebEdit(login).Set "xyz"
Thanks
Nag
OR
Hi
There is nothing wrong with your script,but I found a small syntax error.
myObj = "Login"
browser("B1").page("P1").WenEdit (myObj).Set "Admin"
Nag
OR
1) rather than just specifying myObj = "Login" it is more robust if ur code would have been
like this
this is called descriptive programming . here we are telling the QTP to find an Webedit box
which has the Name property value which is equal to Logine. if you start programming in this
way . u dont even need an entry in the OR.
this wil make your overall script light and easier to load however execution time is slightly
increased.
2) the second flaw i think was a typo in your code the web edit box is speeled as wenedit.
Keep smiling
OR
It can also be done by renaming the object name in ur OR. By renaming the object name in
the OR would be more convinient as it would be reflected in all ur scripts ,wherever the object
has been used, at its own.
OR
Hi,
myObj("name").value="Login"
                OR
myObj("text").value="Login"
Q. Hi
I am new to load testing .Currently i am using Load runner 8.2.
i have recorded a script for login screen with some UID/PWD.In load runner Controller i have
selected 100 Vusers,and i the run script.
My question is :
1.)Is the same script runs 100 times for same UID/PWD what i have entered during
Recording.
2.)If my data base contains only 50 users.Selecting 100 Vusers is a valid case?.
3.)If i have selected 100 Vusers,is it necessary to enter 100 UID/PWD.
Regards,
vivek(Loadrunner)
Ans: 1.Use For loop for executing same script for 100 times.2.It is not valid case.3. Not
necessary.
OR
Hi Vivek,
1.)Is the same script runs 100 times for same UID/PWD what i have entered during Recording
2.)If my data base contains only 50 users.Selecting 100 Vusers is a valid case?.
Ans - Yes it is a valid case because it id not going to your DB to fetch records as it is only
generating the load.
If you want to login as 100 different users then you have to paramterize the script and then
pass 100 users in an excel.
Vivek it is a better practice that for any specific role(User Type) you may put the data in an
XLS and then call that XLS in the program. This will imitate a real life condition.
OR
1) it depends on your script settings. As best practice, you may want to have unique type
selected for your parameterization.
2) Again, this depends on your requirement. If you have 50 users in DB, you can use the
script in cyclic manner.
Question is :
1) Is the same script runs 100 times for same UID/PWD What I have entered during
Recording.
Script doesn't run 100 times, 100 Vusers run the same script Concurrently .
2) If my data base contains only 50 users. Selecting 100 Vusers is a valid case?
If your controller supports 100 vusers
you can run with 100 vusers.
Database doesn't play any role here.
Regards,
Shaik
Q. how can we terminate the application when we encounter a problem or defect in our
application while we running the application in Load Runner,Win Runner and QTP.
Ans: there are many ways of handling this.IN QTP we write the following snippet
1) if you want to close the web application on any defect , write a code snippet some thing like
this
browser("B1").close in side the else condition (if you are using an if else condition)
OR
Press cntrl+F3
or for wrun we can kill the process by press the task mgr, click on th process, select the
process wrun.exe and terminate it.
OR
If we know the error type we use Recovery Scenario to close the apllication.
Q. I have 10 Edit Boxes in my application. i Named them as Text1, Text2, Text3...Text10. Now
i want to set values in these Text Boxes using Loop Statement. Can i Use
for i=0 to 10
browser("b1").page("p1").WebEdit("Text" & i).set "value" &i
next
**********
Ans: Hi
It is 100% acceptable.
For i=1 to 2
Next
OR
Assuming text is the name property by which QTP is identifying the webedit box:
box="name:=Text" & i
for i=0 to 10
browser("b1").page("p1").WebEdit(box).set "value" &i
next
OR
Hi,
for i=0 to 10
OR
Hi
If you want to use descriptive programming then inyour case "Test1", "Text2".... are of
"name" property. The other unique property can be "index"
For i=0 to 9
OR
Dim a, i
for i = 1 to 10 step 1
Browser("BrowserName").Page("PageName").WebEdit("name:=text" &i).Set a
Next
1. While Recording/writing the Script i want to know the " Selecting Tab Position Action
Script".
Eg: Window contains 4 tab positions i would like to select 2 tab position at that time how
script will come. plz write the script and send me.
Ans: 1. Ans: first learn(i.e store objects in Object Repository)Â Â the window and Tabs screen
2. Ans: QTP not recognizing the Tree View but by writing .vbs function we can expand the
Tree View
Regards,
Venkateshwar Reddy
OR
2) If you try to record the treeview in web application QTP will record the nodes you have
selected as -
Browser("AdminCentre").Page("AdminCentre").Frame("frmTreeView").WebElement("ApptixDe
moASP").FireEvent "onmouseover"
Browser("AdminCentre").Page("AdminCentre").Frame("frmTreeView").WebElement("ApptixDe
moASP").Click
Browser("AdminCentre").Page("AdminCentre").Frame("frmTreeView").WebElement("Customer
").FireEvent "onmouseover"
Browser("AdminCentre").Page("AdminCentre").Frame("frmTreeView").WebElement("Customer
").Click
Browser("AdminCentre").Page("AdminCentre").Frame("frmTreeView").WebElement("User").Cli
ck
For this you need to cusomize web event recording configuration as set mouse over event on
and HTML tag event >> treeview as enabled.
Same way enable the HTML tag event >>Tabstrip and start recording will work and you will
have auto generated script for tabs.
OR
Hi,
In windowbased app.........
In Oracle App...
OracleApplication("Oracle Applications").OracleFormWindow("form
name").oracleTabbedRegion("tab name").select
In Java...
OR
Ans:
Hi,
Smart Identificaton is applicable for web application only. Record one object from application
and modify the object property and execute your script. You will get one worning message in
result. Navigate to working message in result file and read the note for smart identification.
Smart Identification is nothing but, if any property of test object is not matching with run time
object property, it will write an worning to result and execute rest of the steps.
Note: In the result Cap symbol will added for smart identification. (By looking in to this we can
say that properties of test object is not matching with run-time object)
Regards,
Ravi Konka
Any property of test object is not matching with run time object property, it will write an
worning to result and execute rest of the steps.
Thanks
Chittoor.srinivasulu
Smart Identificaton is applicable for web application only. Record one object from application
and modify the object property and execute your script. You will get one worning message in
result. Navigate to working message in result file and read the note for smart identification.
May 18, 2006 05:36:30 #4
Madhu Member Since: Visitor Total Comments: N/A
RE: What is Smart Identification in QTP
Generally object identification is used for to identify the GUI objects in the screen. When u
recording the script automatically the object identifer records the objects in the screen (in
winrunner we had GUI map configuration).
But, this smart identification will be idetified the objects. Whether this objects is developed
with same technology or not.
Eg: Application is devloped in JAVA but in places we used some microsoft controls. Where
generally the QTP will have to recongnise the componenets at that time smart identification will
identify the objects.
Hi,
Smart Identification is used by QTP, whenever it is unable to identify any object during run
time. While identifying an object, QTP tries to match the mandatory properties first, if it
couldn't find the object, then it adds assistive properties one by one to identify the object
correctly. This operation is done by smart identifier and it is displayed in the results section
along with one warning message. It's generally used to identify Web elements only.
Thanks
Shiba
Hi Guys Smart Identification is a mechanism provided by QTP and used for identifying the
objects smartly using Base filter properties or Optional filter properties when ever the normal
identification fails due to the dynamic changes in the properties of objects. This will be seen
only in Results window only not stored in the Object repository. I hope u r under stood the ans.
December 10, 2006 03:52:18 #7
g.sri latha Member Since: Visitor Total Comments: N/A
RE: What is Smart Identification in QTP
hi, smart identification is used for idenfying the objects during execution.first Q.T.P tries to
identifies the objects using maniditory and one by one assistive properties.if it is fails then
Q.T.P using the smart identification for identifying the test objects during execution with it's
base filter and optional filter properties.but it is not storing in object repository it stores
secretly and Whenever necessaary it will use by the Q.T.P.
When QuickTest uses the recorded description to identify an object, itsearches for an
object that matches every one of the property values in thedescription. In most cases, this
description is the simplest way to identifythe object and unless the main properties of the
object change, this methodwill work.
If QuickTest is unable to find any object that matches the recorded objectdescription, or if
it finds more than one object that fits the description,then QuickTest ignores the recorded
description, and uses the SmartIdentification mechanism to try to identify the object.
While the Smart Identification mechanism is more complex, it is moreflexible, and thus, if
configured logically, a Smart Identification definitioncan probably help QuickTest identify an
object, if it is present, even when therecorded description fails
At the time of web application recording some of the actions are not identified by
the QTP because some filter effects are associated with that web page so it is not identified
by the QTP, at that time we are using smart identification to record such effects
Ans: It is the library of functions. There are 2 types of functions built-in & user defined
functions. for e.g.
Built-in functions - date, dateadd, instr, Cstr, etc
User defined functions - create a library of functions which you will be using for your
automation purpose and save as an external file (*.vbs / *.qfl / *.txt). Map the file to your
test through Test Setings.
OR
Hi,In QTP 8.2 or earlier versions, the libraries files can be stored with extension .vbs or
.txt.with QTP 9.0 or later, there are 3 supported file formats. .vbs, .txt and .qlf.
OR
Extension are like .VBS ,.Tsr---for PerACTION repository and for Shared Object Repository
it .mtr(Mercury Test repository)
Ans: The main difference between recording and descriptive programming is:
Recording is done only if the first build is released,and can be implemented on second build for
regression testing.
Descriptive programming can be useful to execute on the first build itself.
Ans: In object repository QTP stores the information about the object. There are two types....
1 shared Object Repository
2 per action Object Repository
watch:
Enables you to view the current value of any variable or VB script expression that
you add to the watch tab
variable:
During a run session, the Variables tab displays the current value of all variables that
have been recognized up to the last step performed in the run session.
command:
The Command tab enables you to run a line of script to set or modify the current value of
a variable or VBScript object in your function library. When you continue the run
session, QuickTest uses the new value that was set in the command.
Q. What are the pros and cons of using Shared and Per Action repositories?
Just that whenever any modification is done in the Shared OR, it should again be saved
otherwise it will not be effected when used later
Q.
QTP Questions
hello
could u explain batch runner in qtp and when ur working java application
we r writing library files so in this which script is used bcz in .net it is saved as .vbs but in
java .js so could u please explain
Using Parameterisation when you want to look same functionality with different output.
Devendra
Use anolog recording when exact mouse coordinate is required & do low level recording
when QTP does not recagnize the object
April 17, 2007 08:29:54 #6
dev1504 Member Since: Visitor Total Comments: N/A
Principles of the QTP
In analog we record mouse operations like digital signatures and in low level recording
we record satelite, medical(e.c.g) operations.
Q. problem while recording one object in QTP
I am working on Java Based project, But while I am recording, QTP is not recognising the
object even after adding that object in the OR.. Basically the runtime objects are changing.
Can anybody suggest what to do/ how to use Regular Expression there
Gautam
Ans: Descriptive Programming. You must identify the object(s) that change dynamically
by using some other property rather than name or value that change...
OR
hello chanakya
Thanks a lot for responding to my question.. I had tried with that but not 100% successful. I
will be grateful to You if u can explain it to me a bit in details.. My Email ID is
gautam.sarmah@tcs.com..
Actually When i am looking at the properties in OR with Object Spy, I am finding that the Test
Object property and the runtime-object properties are totally different.
Q.
I am a new learner in Qtp and Practising it .This is query I have a very basic doubt,
I recorded a script in mercury website tours. I wanted to parametrize the name field.
when I did it with Global it worked . But every time it logged in and added the users from
the data table . I wanted the script to login in Once and add the users.
i tried it with the local sheet it did it work.
This is the script I recorded. QTP EXPERTS answer my query. This is the recording of
the
script.
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury
Tours").WebEdit("userName").Set "sjsai70"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury
Tours").WebEdit("password").SetSecure
"4619dd02052b5530abe5ef1ffb5c278b5d051064"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-
In").Click 55,2
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Sync
Window("Microsoft Outlook").Activate
Browser("Welcome: Mercury Tours").Page("Find a Flight:
Mercury").Image("findFlights").Click 98,18
Browser("Welcome: Mercury Tours").Page("Select a Flight:
Mercury").Image("reserveFlights").Click 52,12
Browser("Welcome: Mercury Tours").Page("Book a Flight:
Mercury").WebEdit("passFirst0").Set "shailaaja"
Browser("Welcome: Mercury Tours").Page("Book a Flight:
Mercury").WebEdit("passLast0").Set "j"
Browser("Welcome: Mercury Tours").Page("Book a Flight:
Mercury").WebList("pass.0.meal").Select "Bland"
Browser("Welcome: Mercury Tours").Page("Book a Flight:
Mercury").WebList("pass.0.meal").Select "Vegetarian"
Browser("Welcome: Mercury Tours").Page("Book a Flight:
Mercury").Image("buyFlights").Click 70,7
Browser("Welcome: Mercury Tours").Page("Flight Confirmation:
Mercury").Image("backtoflights").Click
Ans:
1. Datatable
2. Method Argument
3. Dynamic in Datatable
Step 1: First of all we will create parameter for name field like "UName" This parameter
should be created in ActionSheet
Step 2: After that connect the parameter to the name field through the Keyword View
Step 3: After select the Keyword view we should select the Value column in Keyword
view and press the icon of the value column right side.
Step 4: after that we got parameter box in that we will select Parameter option in that we
select Data Table and select parameter in value list box and press ok button it
automatically effect in the expert view in the name field line like
Q. Is there any options available to handle more than one DataTable Simultaneously in QTP
Ans:
1. Local data sheet(For each script u can create ur own data table)
2. Global datasheet(For the entire application u can use only one global datasheet.)
Q.
How to use QTP 8.2 Automation Scripts in Load Runner 8.1 for Load Testing Purpose.
More details on Question: I was trying to call the QTP Scripts from Load Runner
Controller Scenario. There, I only see options for Vuser Scripts, GUI Scripts, Astra Tests
and All Files(*.*) options in drop down box. Do I need to install QTP on Load Runner
Server also to see this option. So that i can all QTP Scripts.
Or please explain the procedure for reusing automation scripts of QTP to Load testing
purpose using Load Runner.
Hi ,
I am facing the same issue how to use QTP 8.2 Automation Scripts in Load Runner
8.1 for Load Testing Purpose.
Did you have any solution for that if yes could you please forward to me it would
really appreciable.
thanks
divesh
Hi
You can select "All Files" in Files of type combo box and select QTP script file with
extension ".usr"
Deepali R. Salaskar
Do we need special lisence to run QTP scripts. I am currently getting error "you don't have
proper license to run"
there is a spcial patch from mercury should be purchased for which the qtp 8.2 scripts will
be compatible with load runner
Q.
Select the action, which you wanna run from the Action list in the Action Tool bar and then
select the first line of the script, right click and select RunfromStep command....... Some one
posted like to execute the command RunFromAction but the command doesn't exist.
Thanks,
Brahma sagar
Select the particular action and click on the position form where you want to run the
script. Then Right Click and select "Run From Step".
Q.
var = browser(browser).page(a1).webedit(b1).getroproperty("value")
Q.
Hi
Go to Tools>Options>Run>select Fast
Nag
bhadra
hi
reduce the lines of script. writing the good testcase means which is finding the correct
error. without using the object repository ie discriptive programming. its the optimisation
we call just decreasing the input and producing the quality.
bye
Q.
Santosh..
Q.
how to comment a block in QTP 8.2
there is no way to comment a block in qtpso only the way to comment a block is putting a
single apostrophe in front of each line of the block
Thanks for the comment. Can you get me link, where i can get more questions on QTP
Browser("dfdf").Page("sdf").WebEdit("dfd").set "ssdsds"
Browser("dfdf").Page("sdf").WebList("sdsd").select 2
Browser("dfdf").Page("sdf").WebEdit("ddfdffd").set "sddfdffsdsds"
Solution :
Function FunctioName()
Browser("dfdf").Page("sdf").WebEdit("dfd").set "ssdsds"
Browser("dfdf").Page("sdf").WebList("sdsd").select 2
Browser("dfdf").Page("sdf").WebEdit("ddfdffd").set "sddfdffsdsds"
End Function
Regarding your issue following are the things you can try:
To comment out a block of code use an If-Then structure, where the expression is 0 or False.
Example:
If False Then
Window("Notepad").WinEditor("Edit").SetCaretPos 0,0
Window("Notepad").WinEditor("Edit").Type micReturn
End If
Note:
QuickTest Professional will still read the lines within the if structure, but it will not execute
them. Therefore, any syntax errors in the block will be reported during run time.
Now it will comment the block of code with single comment line but at a time.
The way that u have given is for QTP 9.1. It doesnot work for QTP 8.2
In QTP 9.2 you can comment block of statements by selecting the statements and right click
and comment it.
Q.
How to automate Java Application? I got error object not found - JavaTree (EXTree)
Hi,
Before u start automation on Java application make sure that u installed Java Add-in for
any testing tool ( say QTP,Winrunner ). And set some properties for particular object before u
automate...finally go for recording or any other method of scripting ( say descriptive ).
There is one more possibility that If u don't add properties of an object in repository( in
QTP ) or GUI map file( in Winrunner ) then also it wil show error saying that object not
found... So in this case make sure that ur object properties are there in repository/GUI map
file.
Regards
Pavan
hai,
u r automate a java application u need to addin manager.this indicates which technology
we r using marked on that.
Q. How does QTP Intentfies if page has 10 buttons with same name & value
Ans:
RE: How does QTP Intentfies if page has 10 buttons wit...
For this question I will just suggest an example. Let us think there are 10 buttons in a
page. Then all these buttons will have some similar properties and every button will have
atleast one unique property. If u r aware how qtp idetifies the objects then u must have
known about how it learns the properties of the objects by using mandatory properties,
assistive properties, and/or by using smart brain. As per my knowldege every object in a
page will the windowid in unique and by selecting the windowid property in the assistive
properties or in the smart brain will help in identifing the objectings. Even one can use
this property in the mandatory properties list or smart brain.
Fine, Let there be ten or hundread buttons their will be many unique properties to identify a
button uniquely. For example, the button will not be at same x and y coordinates so with the
help of x and y coordinates QTP can identify them uniquely
If all the properties are the same (even assistive) then QTP uses ordinal identifier such as
index of the object in the page.
if u change ur monitor from 15" to 17" then x y coordinates will change. so how will u
run the same test case there? or u have to change ur code. so there must be some other
way than x y coordiantes.
March 13, 2007 04:25:06 #5
saurabh Member Since: Visitor Total Comments: N/A
RE: How does QTP Intentfies if page has 10 buttons wit...
When there are same objects with ame name than qtp identifies it with the help of smart
identification.
it uses either index or location property value to identify objects.
If all the properties are the same (even assistive) then QTP uses ordinal identifier such as
index of the object in the page.
Ans: We can schedule test execution in Quality Center only. To do this first you need to go
test Lab module there you will find "Execution Flow" tab. In that tab you can specify a date
and time to schedule your test.
I hope we cann't schedule a test run in QTP. Anybody plz correct If I am wrong.
-Mulls
Ans: Hi,
This is Ijaz.
Dialog("text:=Login").WinButton("text:=OK").Click
Window("text:=Flight.*").Close
Hi
How to pick the data from the drop down list box. At the record time it captures the data from
the combo box but while running the script QTP is unable to open/recognise the Drop down
combo box to select the data.
Is there any code for that?Can any one solve my problem plz.
I am really running out of time.
Thanks,
Livetek
Ans: Ok...When you recorded, your script might be calling the object..i(n this case..the
dropdown list item) by its name.
Go to the object repository and fidn that object and look at its properties on the right side. The
first two properties could be the primary...and the name might not be the primary property.
Try using a differant property.
Or Try descriptive programming. Learn about descriptive programming and learn a lot about
object repository...thats ur only hope and hurry up..do it ASAP..if u dont understand the
object repository....u cant do nothin with QTP
OR
OR
if all the above not working then we have to add java addin in QTP
Hi, We have got a project to be automated using QTP. The application however has been
designed using C/ C++ as told by the client.
The problem with the QTP (free version downloaded from the net) is that it doesn't identify the
objects at all other than the window object.
When record playback is done all the actions are in terms of x - y co-ordinates and click
methods of QTP.
Is there a separate add-in for learning the objects in this scenario?
Also if there is no need for the additional add-ins can you please let me know some feature of
QTP which will help me in identifying the objects?
This is needed on an urgent basis as the client has already given us the project to start!!!!
Thanks in advance,
Raghu
Ans: Hi Raghu,
You don't need any addins for C++ applications .If you try writing your own code
ex.Window("").Dialog("").etc  by capturing objects into repository or use descriptive
programming it will work. As I'm also working on a c++ application I have this problem
when recording, but when I write my code its working fine.Let me know if you need any more
help.
Regards,
Chaitanya
Ans:yes u can connect through DSN.( create DSN from control panel).And create bd
copnnective object like, set dbconnect= createobject("ADODB>connection"). and
checkdbcfonnection.open is true or not.
Q.
3.Capture the output values and other information from the application during runtime.
Note: You can also write this function externally and it should be saved as .vbs, and add this
function in "Test-->settings-->Resource" and call this function by its name in Qtp .
Plz.......Could anyone send me the script for this Question. "How do you write Log Files in
QTP?"
i am familiar with the basic functionality now i want to learn advanced topics
Ritu
June 03, 2007 06:45:55 #5
venkat Member Since: Visitor Total Comments: N/A
RE: How do you write Log Files in QTP
hi log files used to show the results to the client ,client can believe by seeing the results
produced after execution of the scripts in log files ,
at the end of the path we should give the symbols like 1-read
2- write
8-append
Q.
How to automate Java Application? I got error object not found - JavaTree (EXTree)
Before u start automation on Java application make sure that u installed Java Add-in for
any testing tool ( say QTP,Winrunner ). And set some properties for particular object before u
automate...finally go for recording or any other method of scripting ( say descriptive ).
There is one more possibility that If u don't add properties of an object in repository( in
QTP ) or GUI map file( in Winrunner ) then also it wil show error saying that object not
found... So in this case make sure that ur object properties are there in repository/GUI map
file.
Regards
Pavan
hai,
u r automate a java application u need to addin manager.this indicates which technology
we r using marked on that.
Q.
there is no way to comment a block in qtpso only the way to comment a block is putting a
single apostrophe in front of each line of the block
May 10, 2006 02:36:16 #2
Prasanth Member Since: Visitor Total Comments: N/A
RE: how to comment a block in QTP 8.2
Thanks for the comment. Can you get me link, where i can get more questions on QTP
Browser("dfdf").Page("sdf").WebEdit("dfd").set "ssdsds"
Browser("dfdf").Page("sdf").WebList("sdsd").select 2
Browser("dfdf").Page("sdf").WebEdit("ddfdffd").set "sddfdffsdsds"
Solution :
Function FunctioName()
Browser("dfdf").Page("sdf").WebEdit("dfd").set "ssdsds"
Browser("dfdf").Page("sdf").WebList("sdsd").select 2
Browser("dfdf").Page("sdf").WebEdit("ddfdffd").set "sddfdffsdsds"
End Function
Regarding your issue following are the things you can try:
1. ‘ for commenting out a statement
To comment out a block of code use an If-Then structure, where the expression is 0 or False.
Example:
If False Then
Window("Notepad").WinEditor("Edit").SetCaretPos 0,0
Window("Notepad").WinEditor("Edit").Type micReturn
End If
Note:
QuickTest Professional will still read the lines within the if structure, but it will not execute
them. Therefore, any syntax errors in the block will be reported during run time.
Now it will comment the block of code with single comment line but at a time.
The way that u have given is for QTP 9.1. It doesnot work for QTP 8.2
In QTP 9.2 you can comment block of statements by selecting the statements and right click
and comment it.
Q. I am trying to add object from repository dialog box. it creates new page(flight confirm
mercury_2) and adds the new object under it. Ideally it should add new object to the existing
parent page(flight confirm mercury). how to overcome this problem
Ans: Just make the page a regular expression. How to do that is Go to Object repository--
>Select the Object in the repository-->In the Object repository window you will find
"Configure Value" item to the right side-->In that U will findTwo fields with name Constant
and Parameter-->Beside Constant fields u will find an ikon in white colour-->Click on that--
>The title of the page gets displayed in a new dialog box called Constant value options-->Just
add '.*' at the last position to the title and check the regular expression Check box
OR
Software test scripts are conventionally composed ad hoc by a coder. Some software
development tools help automate testing by recording tests that are run, allowing
"playback" of the test routines. However, an entire test routine is rarely, if ever,
applicable to more than one release of one application. Data-driven testing adds some
modularity by keeping test input and output values separate from the test procedure, but
the procedure itself is still in a monolithic script. Keyword-driven testing breaks the
test procedure into logical components that can then be used repeatedly in the
assembly of new test scripts.
OR
Keyword-driven Testing
Keyword-driven testing breaks the test procedure into logical components that can then be
used repeatedly in the assembly of new test scripts.
OR
There are 2 types of Environment variables.....Built-in & User-Defined
User-defined variables are developed by the users in the .xml format and uploaded in the
Test Settings -> Environment -> User Defined -> File