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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to handle the exceptions using the recovery scenario manager in qtp?

564


What is debugging? How you debug your script?

603


Where to use function or action?

667


Hi, I am using OutputCheckPoint for 2 webelements Bed:4 and Bath:2 Full,1 partial in my result page and I am storing the value in the data table. I dont need the string Bed:4,I would like to get only the no 4. How can I get it? Even though I highlight only 4,It is seleting the full value "bed 4". Same thing happend for second webelement Bath:2 Full,1 partial I need only the No 2. I used the following to split MyArray = Split(UIBathResult, " ", -1, 1) But it is giving the value My Array(0)=Bath:2full,1Partial I need the only the nos for further comparision.Any help? Thanks Uma

3240


How to start recording using quicktest professional (qtp)?

595






What is the Difference between test object and run time object?

605


How QTP support all types of applications (platforms)?

4073


Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?

616


How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object

2523


What are the differences between table and db checkpoints?

529


I had installed QTP 9.2. It is working fine but whenever I open QTP, it is trying to reinstall the below-mentioned files again and again "QTP92PS82UPGRADE.exe", "recogn.dll". If anybody has these files, please provide those files in this site or you can send that files to my mail id also (lravi4u@yahoo.com). If you don't know where the files will be in the QTP, search in the QTP software CD or path of QTP program installed (C:\Program Files\Mercury Interactive\QuickTest Professional)

1452


images are dynamically changes how to compare two images with out using the bitmap

2001


Explain advantages and disadvantages kdf?

516


how can i pass a "cript"as a parameter in to a function

1454


when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next

3264