Hi Friends,
I'm new to QTP.
I want to write a function in QTP for below senario.
In an Excel sheet column B, I Have 10 Url/Links, and in
Colum A there is a Flag as Y and N.
My test should run only on those iterations which are
flagged as Y.
Please help, Thanks
Answers were Sorted based on User's Feedback
Answer / manju
'path of the excel file is - path
'excel file name is abc.xls - columns flag & urlxl
'sheet name of the xl file where the url's are present
is "list"
datatable.addsheet("Urllist")
datatable.importsheet("path abc.exls","list","Urllist")
count=datatable.getsheet("Urllist").getrowcount
for i = 1 to count
datatable.getsheet("Urllist").setcurrentrow(i)
flg=datatable("Flag","Urllist")
if flg='Y' Then
url=datatable("urlxl","Urllist")
systemutil.run("url")
End if
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / murli.me
get data from exel file into two variables for col(A) and
col (B).
get the Flag into a variable
count the no of URL's.
check the condition for the flag if flag=y then repeat the
test for the no of times the URLS are present..
is this right... if not sujjest me the right one please......
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / murli
get data from excel
n=datatable.usedrange.rows.count
for i= 0 to n
a(i)=workbook.cells(i,1)
x=a(0)
y=a(1)
next
if x=yes then
write script
endif
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / nil
Thanks Manju and Murli,
After doing bit modifications The above code worked fine
for me....
Please check for my new question whenever u get free time.
Regarding
(How to trap an error message on Web page through QTP.)
Thanks a lot for ur great help :).
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nil
Hi,
Thanks for ur answer :)
I'm sure your answer would be correct. but it would be
great if you provide me code, as I'm not that perfect in VB
scripting.
Thanks Again :))
| Is This Answer Correct ? | 0 Yes | 1 No |
hi everyone today is the first time i saw this website,and hi iam siraj,iam very impressed by seeing evryones response towards questions,iam a newcomer and i have got tryining in testing can anyone please send me some projects relaited to testing.i know it is very confidential but still if u send it will a great help. my mail id venku_krs@yahoo.co.in
What is the default add-ins in qtp?
any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in
What is difference between Class and MicClass
Where are the snapshots stored?
Syntax for how to call one script from another and Syntax to call one "Action" in another?
Using Object Repository is a advantage or disadvantage?
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!!!!!
I have a Webedit object. some text is entered in that object I want to know the font sixe of that text.How could I do this using QTP? This is a requirement for me. I am happy if any one help on this
tell me abt a time when u had to go above &beyind the call of duty to get the job done
Key word driven framework
How u perform exception handling in QTp,what is other name for ths?