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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.

1367


Explain the features of quick test pro(qtp)?

569


after click on compose mail how can we attached a file in qtp with vbscript code

1609


Define Error Pane of UFT?

686


Can we create a qtp test from qc?

586






Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?

1519


An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?

648


Hi All, How to Compare two strings character by character in QTP

953


Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version

1404


Hi, I'm a beginner in QTP and planning of a certification in QTP, but have no idea about it :P. Could anyone please tell me what certifications that a QTP- beginner can take? What is the fees and the syllabus for the certification? Please reply soon. Thanks Vidhya

1419


Tell some commonly used Excel VBA functions?

593


What are the different attributes used with regular expression?

548


What does mean by Scope of Automation?n How we defined it?

1570


desribe a situation where u faced a stressful situation and how did u cope with it

1404


is it possible to add sheets to excel at runtime

3230