F Our QTP
F Our QTP
F Our QTP
IBM
Through array we can execute the testcase how ? give me example TCS
which browsers versions are supported in loadrunner 8.1?if any patches are
TCS
required for browsers?
How to swap two numbers by using parameter passing method byref in a
CTS
fucntion and return the result to outside of the function?
How to integrate the qualitycenter with qtp Wipro
What is deference between Action and Test? with Examples? Satyam
How to capture checkbox properties when properties of the object keep
TCS
changing on relogin to the application.
what is descriptive programming?
ell me types of environment variables? what r they? explain
IBM
details? pls give anwer any one?
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
#1 syntax errors in the
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.
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
# 1
Option Explicit
Dim a,b,c,i,leng,var
b=0
c="a"
a="Koteswararao"
leng=len(a)
msgbox "length of"&" "&a&" "&"is"&" "&leng 'optional step
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
# 1
Load Test is ideally done only once, and only after all the
Functional Testing (UAT/SIT).
SystemUtil.Run "iexplore.exe","www.google.com"
Browser("name:=Google").Navigate "http://www.cnn.com/"
There is web page with the webtable,this contains some data, how do you manipulate
the data.
Answer we have two methods to get the data from webtable
#2
1)getrowwithcelltext(we can get the rownum )
syntax:- Browser("micclass:=Browser").page
("micclass:=Page").WebTable("micclass:=WebTable","htm
l
tag:=Table").getrowwithcelltext("text")
2)getcelldata
syntax:- Browser("micclass:=Browser").page
("micclass:=Page").WebTable("micclass:=WebTable","htm
l
tag:=Table").getcelldata(rownum,colnum)
What is the difference between low level recording and virtual object.
Answer Low-Level Recording—enables you to record
# 2 on any object in your application, whether
or not QuickTest recognizes the specific
object or the specific operation. This
mode records at the object level and
records all run-time objects as Window
[Parent]or WinObject[child] test objects.
Use low-level recording for recording in
an environment or on an object not
recognized by QuickTest.
How do i relate the checkbox properties with webelement when checkbox properties
are changing on every login to the application
Answe we can solve this by using regular expression and setto
r pro
# 1 perty method
---------------------------------------------------------
---
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....
newval=oh.link("linkname").getroproperty("name")
objectheirarchy.link("link name").setto
property "name","newval"
Code:
Problem:
how to get no.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;
i<==num(i), i++)
Next
Answer
# 2 rcount=usedrange.rows.count
how to choose the framework in qtp ? 2)when we go for the descriptive programming ?
Answer datatable.SetCurrentRow(3)
# 1 x=datatable.Value("A",1)
msgbox x
datatable.Value("c",1)=x
msgbox c
--------------------------------------
A c
mango
banana
brinjal
carrot
Answer strCnt=DataTable.getRowsCount
# 2 For i=1 to strCnt
datatable.SetCurrentRow(i)
x=datatable.Value("A")
datatable("c")=x
Next
Answer datatable.setcurrentrow(3)
# 3
x=datatable.value(2,1)
msgbox x
'output is veget
Answer i= inputbox "enter ur string" # say brinjal
# 4
r=datatable.getrowcount #get row count
for i=1 to r #loop till the end of the row
datatable.setcurrentrow(i)
aa=datatable.(a ,dtglobalsheet) # column 1 value into aa
if instr(aa,i,1)=1 #compare the strings
bb=datatable(b,dtglobalsheet)
msgbox bb
exit
else
i=i+1
next
How to export QTP results to an .xls file?
EX:
datatable.AddSheet "venu"
datatable.DeleteSheet "Global"
datatable.DeleteSheet "Action1"
datatable.ImportSheet "C:\Documents and
Settings\Administrator\Desktop\Mallik.xls",1,"venu"
For i=1 to 9
datatable.SetCurrentRow(i)
systemutil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
Dialog("Login").WinEdit("Agent Name:").Set datatable
("A","venu")
Dialog("Login").WinEdit("Password:").Set datatable
("B","venu")
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").WinMenu
("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open
Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit
("Edit_2").Set datatable("C","venu")
Window("Flight Reservation").Dialog("Open
Order").WinButton
("OK").Click
x = Window("Flight Reservation").WinEdit
("Name:").GetVisibleText()
Datatable("D","venu")=x
Window("Flight Reservation").Close
Next
for example..
if window("XXXX").dialog("XXXX").exist then
window("XXXX").dialog("XXXX").winbutton("text:=XXXX").click
window(("XXXX)).winbutton("XXXX").click
else
<put remaining script here>
end if
How to add multiple values in rows, under a single column of a run time datatable?
or else
u can manualy give the values into the shhet
datatable.value(parametername,sheetname)=parametervalue
I have 1 to 10 action are there, 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.
For eg.
in Action1_Properties:(Input-Parameter: InputName, Type)
THEN
Set fso =
CreateObject("Scripting.FileSystemObject"
)
Set f = fso.OpenTextFile("c:\DIM.txt", 1,
True) ' open to empty file and also use
for open the file which is already
created
WriteLineToFile = f.ReadAll 'Read all
the file line to
line
msgbox WriteLineToFile
Answer a =
# 1 Datatable.GetSheet("SheetNmae").GetParamete
rCount
If a = "" Then
b = inputbox ("Enter the no.of columns")
For i = 1 to b
Datatable.GetSheet("sheetname").AddParamete
r
("paraname","paravalue")
Next
End If
Syntax for how to call one script from another and Syntax to call one "Action" in
another?
Answer RunAction ActionName, [IterationMode , IterationRange ,
# 1 Parameters]
Answer
# 1 20 secs.
st me out the shortcutkeys for some functionlities in the qtp for example to record ,to
run ... etc
7. 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. But, if program is designing memory capacities and
other things while run time, potential for generating an
error is much higher.
Answer a) When the use the two are more string then use
# 2 instr ()
b) Ex: - This like instr (str1, str2, ?)
Think and Reply.. can we parameterize radio buttons, check boxes? as in flight web site on
flight preference page, choosing different flight produces trouble if from port and to port
been parameterize, and runs. Try it by own you will get the error.
What is the difference between Mandatory and BaseFilter Properies..Anybody please answer
me..Thanks in Advance
2.
dim exp,act,cmb_1,cmb_2
cmb_1_cnt=browser("...").page("....").weblist
("...").getitemcount
exp=browser("...").page("...").weblist("...").getitem(i)
call cmb_2_Func()
Next
Function cmb_2_Func()
cmb_2_cnt=browser("...").page("...").weblist
("...").getitemcount
act=browser("...").page("...").weblist("...").getitem
if (act=exp) then
End if
Next
End Function
Is there any option in QTP to add Java add-in after instaling the QTP?
Answer Yes, first you have to install QTP after you are
# 1 enable to install Add ins as .net, oracle, java, etc.
how can you describe the basic flow of automation with conditional and programmatic logic?
Answer if endif
# 1 for next
while-wend
do-loop
should be used to control the flow of automation
What is the abbrivation of .mtr in action reposirtory?
Answer
# 2 mtr stands for mercury test repository
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.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.
Please give a idea to overcome .
how u conduct GUI testing and PERFORMANCE testing on MS- WORD? and What r the GUI
Test Cases and performance Test Cases?
1) inserting synchronization
point
2) inserting wait() method
3) using .exist() method
4) increasing the global
syncronization time
Hi, OUR PROJECT NAME IS: HOSPITAL CONTROL SYSTEM. IS IT COMES UNDER WHICH
DOMAIN(HEALTH CARE OR HEALTH INSURANCE)
Answer
# 1 it comes in Health care domain.
suppose i opened 6browsers and i want re-open the 4browser what is code for this..pls help
me..
Answer BrowserName =
# 2 Browser("CreationTime:=3").GetROProperty
("URL")
systemutil.Run BrowserName
Like :
1. If you want any perticular defect from
1000 logged
defect list.
2. You can filter Defect entered by some
person.
3. You can filter Defect Assigned to some
person.
4. You can filter Status of defect. etc
what is On Error Resume Next ?
Dialog("Login").WinEdit("Agent Name:").Set
DataTable("Agent_Name", dtGlobalSheet)
Dialog("Login").WinEdit("Password:").Set
DataTable("Pword",dtGlobalSheet)
Dialog("Login").WinButton("OK").Click
er=DataTable("Exp_Res",dtGlobalSheet)
ar=DataTable("Act_Res",dtGlobalSheet)
If Strcomp(er,ar)=0 Then
DataTable.Value("Remarks")="OK"
Else
DataTable.Value("Remarks")="Defect"
End If
DataTable.Export("D:\QTP9\LoginResults.xls")
Answer Hi,
# 2 If you don't split the test in to
action, each time
you run it'll run the whole test. which
is the waste of
time and efforts.Splitting the action is
useful especially
when we parameterize the object.When you
parameterize the
object if you don't split into actions
the whole test will
run that many iterations.
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.How to convert this format to 01-01-09?
val = "01-jan-09"
Conv_Val = cdate(val)
msgbox Conv_Val
Result : "01-01-2009"
WHAT ARE THE SHORTCUT KEYS IN QTP?