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
How to handle the exceptions using the recovery scenario manager in qtp?
What is debugging? How you debug your script?
Where to use function or action?
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
How to start recording using quicktest professional (qtp)?
What is the Difference between test object and run time object?
How QTP support all types of applications (platforms)?
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?
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
What are the differences between table and db checkpoints?
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)
images are dynamically changes how to compare two images with out using the bitmap
Explain advantages and disadvantages kdf?
how can i pass a "cript"as a parameter in to a function
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