Professional Documents
Culture Documents
com
www.ramupalanki.com
for more QTP scripts, visit www.ramupalanki.com
www.ramupalanki.com
for more QTP scripts, visit www.ramupalanki.com
vbs file contains the user defined functions which are reusable that can be used in our
test or compnent according to our requirement
What are the properties you would use for identifying a browser & page when using
descriptive programming ?
"name" would be another property apart from "title" that we can use.
OR
We can also use the property "micClass".
ex: Browser("micClass:=browser").page("micClass:=page")..
What is the file extension of the code file & object repository file in QTP?
File extension of
-- Per test object rep :- filename.mtr
-- Shared Oject rep :- filename.tsr
Code file extension id script.mts
what is the use of Text output value in Qtp?
Output values enable to view the values that the application talkes during run time.When
paramaterised, the values change for each iteration.Thus by creating output
values, we can capture the values that the application takes for each run and output them
to the data table.
What are the Features & Benefits of Quick Test Pro (QTP)..?
(a). Key word driven testing
(b). Suitable for both client server and web based application
(c). Vb script as the scriot language
(d). Better error handling mechanism
(e). Excellent data driven testing features
By default Action1 runs first in QTP. Is it possible to start the run with Action2?
es it is possible. Place the cursor at the start of your Action2 and right click, select
Run from Step.
What is parameterization? What is syncronization pt.?
QuickTest enables you to expand the scope of a basic test or component byreplacing fixed
values with parameters. This process, known as parameterization,it greatly increases the
power and flexibility of your test or component.
synchronization point is that which handles anticipated timing problems by ensuring that QT
waits for some times until the application is ready for the next step
what is descriptiveprograming? how to do object identification thrugh Descriptive and is
possible smart identification or not
Descriptive Programming: Whenever QTP records any action on any object of an
application, it adds some description on how to recognize that object to a repository of
objects called object repository. QTP cannot take action on an object until unless its
object description is in the Object Repository. But descriptive programming provides a way
to perform action on objects which are not in Object repository
What are accessibility check point and xml check point?
Identifies areas of a Web site to check for Section 508 compliancy.
Check if the images on a Web page include ALT properties, Activex checks, Applet check,
Frame work, multimedia links, serverside images required by the W3C Web Content
Accessibility Guidelines
XML check point id used to check the statistical information of webpage or web page frame.
XML Check point has two modes
1.XML check point for Page
2.XML check point for Frame.
XML check point for Page,It verifies broken links
XML check point for Frame,It verifies no of links No of Bitmaps,...etc
when qtp recognizes a web link like (hyper link)wich properties it is going to take to
identify the objects unquely? what is Ini file in QTP?
QTP recognises the web link with following object properties
Name :
www.ramupalanki.com
for more QTP scripts, visit www.ramupalanki.com
Class:
FOR example if you click on web link like www.yahoo.com,
QTP recognised the link with folling attributes:
Name:Yahoo!
class:page
inthis way it identies the web link.
How to load a object repository(using VBScript) ... very urgent....
Dim app
Set app =CreateObject("QuickTest.application")
app.test.settings.resources.ObjectRepositoryPath
= "C:\Documents and Settings\\aa.tsr"
Can any body tell me how can I choose the share object repository and per action object
repository mode. Please give me with steps.
In QTP, default mode is per-action. We have a multiple actions within the same script,
each and every action contains separate object repository. In per-action both
script and object repository both are tied with each other.
If you choose as shared object repository, all actions contains only one object
repository. We can use this object repository to any actions, and memory is also save. Here
script and object repository both are independent with each other.
Go to test menu --> click resources tab --> you can view shared or per-action object
repository.(In QTP 8.2 version)
What are FAST and NORMAL modes in qtp ? Why r these modes intended for ?
When ur running from QC it is in Fast Mode and Normal Mode is when execute from QTP.
Main Difference is in Fast Mode QTP doesn't show Execution marker where as in Normal Mode
it will show the Execution Marker.
What is the difference between "call to action" and "call an existing action"
call to action : the changes made in call to action, will be reflected in original
action(from where the script is called).But where as in call to copy Action , the changes
made in the script will not effect the original script(Action).call an existing action
means calling a reusable action that is stored in same test or in some other
test wich is like a function call.
Re: how do u retrieve data from a database ? i.e. i want to retrieve 2nd record only from a
database ? write code for this. by using ADODB connecton, RSOBJ and using a FOR loop we can
retrieve all the records( ex: if we give query as select * from emp). but i want only 2nd
record. so how to acheive this.
I think you need to set your for loop so that it reads only
2 records or as many records from the record set that you
want. i.e for i = 1 to 2
read the next record
next
this way you have the 2nd record
how do check the links in a webpage ?
You can check it using
“if obj_ChkDesc(“html tag”).value = empty then”
How do u write regular expression for a window name which is changing for each build ? i.e.
in first build the window name is : "computer graphics are very ...." . in second build the
window name is : "computer graphics can be created" . - Appreciate proper replies
I think the right answer is "computer graphics.*".
Here “.” means any single character and “*” means 0 or more
occurrences of preceding character. So .* means 0 or more
occurrences of any character.
How do u write a regular expression for date (dd/mm/yyyy) field ?
[0-3][0-9]/[0-1][0-9]/[1-2][0-9][0-9][0-9][0-9]
Pls let me know completely about descriptive programming, where it is used, pls explain
with a real time example of its occurence and the program code written in qtp.
www.ramupalanki.com
for more QTP scripts, visit www.ramupalanki.com
Whenever QTP records any action on any object of an application, it adds some description
on how to recognize that object to a repository of objects called object repository. QTP
cannot take action on an object until unless its object description is in the Object
Repository. But descriptive programming provides a way to perform action on
objects which are not in Object repository
There are two ways in which descriptive programming can be used
1. By creating properties collection object for the description.
2. By giving the description in form of the string arguments.
Hi guys, can anyone explain me whats the method for reporting the QTP test results to
teamlead or non-QA member (developer/PM)? Thanks in Advance!!!!!
Prepare a Text file with High Level results then report by mailing the same.
How do u retrieve data from a text file into different variables. i.e. in a text file named
"source" , the data is like : india,1000,japan,200,china,50,singapore,45050 this is given
in the first line of the text file. in the second line of the text file the dta is:
sun,moon,planet,river,earth,water if u use "readline" method by using FSO concept u can
retrieve the entire line in to a variable. but i want to import each field (ex: "india" in
one variable, "1000" in another variable etc..). Apprecitae proper replies.
set fso=createobject("scripting.filesystemobject")
set f=opentextfile(path,1)
set a=new regexp
a.pattren="[a-z]+|(\d)+"
a.ignorecase=true
a.global=true
do while f.atendofstream <>true
r=f.readline
set b=a.execute(r)
for each val in b
msgbox val
next
loop
f.close
dz will get u much information later u can modify as per ur requriment.
I am using excel sheet to export data to QTP but it selects just one row of data from excel
sheel how to import all rows of excel sheet to QTP during runtime
Here i am sharing a small snippet script, to import the data from Excel sheet to QTP during
runtime and using the values.
I have an Excel sheet which contains OrderNumber column and its values. After that i am
displaying the order numbers in excel during runtime.
datatable.Import("E:\Programming Samples\QTP Samples\OrderNumbers.xls")
datatable.GetSheet(1)
rowCount=datatable.GetRowCount
For i=1 to rowCount
datatable.SetCurrentRow(i)
val=datatable.Value("OrderNumber","Global")
msgbox(val)
Next
While recording a login window QTP is identifying only parent window,then how can u
identify the child objects.
you can use "ChildObjects" method to to identify child objects
for Eg:It will click on all child objects
Set oDesc = Description.Create()
oDesc("html tag").Value = "INPUT"
set hai=Browser("WinCraft2 - Enterprise_2").Page
("WinCraft2 - Enterprise").Frame("content").ChildObjects
(oDesc)
www.ramupalanki.com
for more QTP scripts, visit www.ramupalanki.com
count1=hai.count()
msgbox hai1
For i=1 to count1
hai(2).click
Next
I want to check in the data table(Globalsheet) column exist or not through script .If
column not exist only proceeded to next step Pls tell me how to proceeded?
Function isParameterExists(sheetName, paramName)
isParameterExists = FALSE
ParamTotal = DataTable.GetSheet("Global").GetParameterCount
For i = 1 To ParamTotal
value = DataTable.GetSheet("Global").GetParameter(i).Name
Msgbox value
If strComp(paramName,value)=0 Then
isParameterExists=TRUE
Exit Function
End if
Next
End Function
'Example:
If isParameterExists("Global","hh") then
msgbox "Patameter exists"
Else
msgbox "Patameter does not exist"
<Your statements>
End if
what is QTP batch testing tool?
in qtp tool only one option is avaliable to do batch testing .(batch run, see in the amd
tool in qtp)batch testing is nothing but run the test suite(a set of
test scripts). In this just give the path of each script and run the batch.
suppose u hav a dialog or window which contains 10 buttons with same name & value. now how
to check each button? i.e. how qtp indetifies these objects separately?
QTP identifies object based on mandatory properties ,assitive properties which are present
in the object repositery and it also uses its smart identification if it is enable .if at
all it unable to find the object with this properties it will go for ordinal identifier OR
This Will Show the order used to identify the object when two or more objects get
duplicated.
tools -> object identification
select the environment
a) standard windows
b) active-X
c) visual basic
d) multi media
select the class if we select the environment as standard window and class as winbutton
then it will display
Mandatory properties Assistive properties ordinaliden-
tifier
-------------------- ------------------- ------------
a)Native class a)window-ID a)location
b)Test b)Index
what is the process to follow between writing the test cases & then atomating it?
Manual written test cases will help at the first execution of the build and it will be
consumed upto the get the stable build. It includes all the validations and the
www.ramupalanki.com
for more QTP scripts, visit www.ramupalanki.com
behaviour of the application . In this scripts the Navigation steps should be clear.
Automation of scripts will happens after getting stable build to test regression effects.
The same scripts which we executed manually will be used for automation. Based on the
expected values we will be placing the check points. Automation is not a creation of test
cases but same written test cases will be automated by record and play back option.
www.ramupalanki.com