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



Hi Friends, I'm new to QTP. I want to write a function in QTP for below senario. In an Excel..

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

Hi Friends, I'm new to QTP. I want to write a function in QTP for below senario. In an Excel..

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

Hi Friends, I'm new to QTP. I want to write a function in QTP for below senario. In an Excel..

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

Hi Friends, I'm new to QTP. I want to write a function in QTP for below senario. In an Excel..

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

Hi Friends, I'm new to QTP. I want to write a function in QTP for below senario. In an Excel..

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 Friends, I'm new to QTP. I want to write a function in QTP for below senario. In an Excel..

Answer / murli

you can better use recovory scenarios,,,

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More QTP Interview Questions

Please explain me in detail! How to handle runtime errors in QTP useing recovery senario or with out scenario

5 Answers   Quinnox,


what testing activities u may want to automate?

2 Answers  


While testing .net applications with QTP 9.1 in normal recording mode, QTP records my unintentional mouse clicks and window dragging which I don't want. But I can't stop QTP recording those mouse clicks and window dragging. Can somebody let me know how I can get rid of it, please ! Thanks.

1 Answers  


How can i get the image text that changes dynamically? Here i have used "GetROProperty", but it's not working. I used like Ex:Browser("webmail").Page("inbox").image ("captchaimage).getroproperty("innertext/text/value")

0 Answers  


hello, i was install Q.T.P.8.2 in windows xp version .when i am running my programs all the desktop icons are disappear why so. please guide me anybody how can i come out side this problem.

3 Answers  






Explain the terms test and business component?

0 Answers  


What all challenges you have faced during automation and how you have resolved it?

2 Answers   Genpact,


Does QTP support Linux Red Hat? Does QTP support Flash?

4 Answers  


How can you handle exceptions in qtp?

0 Answers  


can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.

2 Answers   AppLabs,


How to customize qtp?

0 Answers  


Explain QTP Testing process ?

13 Answers   TCS,


Categories