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 |
what are the limitations of smart identification in qtp 9.0
What is the latest version in QTP?
55 Answers Bharti, Polaris, US Technology,
Can u explain about QTP framework
Hi I am from delhi, Now I can surely say that no institution of QTP here in Delhi After reading you people I want to get cry, from last six month I am trying to learn QTP, I have knowledge too but dont know VB Script. Now it appears that without learning QTP no one can learn complete QTP, I want to get a formal learning in QTP. Can you suggest me the best institution. and please let me know the charges and span of the course too. thanks in advance to you alkaa.dugaal@gmail.com
It is a SQL question. Write a query to find top three salaries in an EMP TABLE?
What are the differences between qtp and winrunner?
what is virtual object?
Hi Guys, I tried to install java add-in for QTP 9.5 after the whole installation but it didn't install but then i also found in documentation saying that winrunner7.6 patch for java plugin would work fine with QTP. But when i tried to install from winrunner7.6 it asks me for the path of winrunner So my question is are we supposed to install winrunner for java add in to work on QTP. Please suggest me
What is Tree view?
Hello, Can we capture only the labels of the web page in the object repository. If yes, then how. Actually my scenario is: I have to capture all the label of mercury site http://newtours.mercuryinteractive.com/tour/mercurypurchase. php. and want to copy all these labels in the notepad. So,please help me how to do this all. Thanks in advance, Gaytri
In Object Repository, two actions r there. Action1 name is A.tsr, Action2 name is B.tsr. Is it Possible? if Yes, what is the out put of A+B? if No, why?
Hi, When I click on a hyperlink a secondary pop-window will open. In that pop-up window there will be 'N' number of records arranged in with paging option in datagrid table. Each rows contains two columns, one is text and the other is a radio button. I will pass the first column value and based in it the tool have to select the corresponding radio button in that row. Please someone help me how to handle this as am new to QTP.