I have thousands of links are there, i want check each and
every funtionality of link by using descriptive programme,
retrive link name from excelsheet then operate in
application. Please anybody send me model script



I have thousands of links are there, i want check each and every funtionality of link by using des..

Answer / tvsramakrishnachowdary

Soppose i Have excel file in the "D:\links.xls" which
contain all link names in the "Sheet1" with column
name "Link_Name".Let us assume Here link names i gathered
from Gmail Login Page ok....now my approach is as below..

pre req setting in the QTP:
1)Goto File
2)setting->run tab
3)check run one iteration only

datatable.import "D:\links.xls"
set mylink=description.create
mylink("mic class").value="Link"
mylink("html tag").value="A"
linkcoll=browser("name:=Gmail.*).page
("title:=Gmail.*).childobjects(mylink)
cnt=linkcoll.count
for i=1 to datatble.getrowcount
datatable.setcurrentrow(i)
explink=datatable.value("Link_Name",1)
msgbox explink
for j=1 to cnt-1
actlink=linkcoll(i).getroproperty("name")
if explink=actlink then
linkcoll(i).click
if (browser("name:=Gmail").page(<here new page
title>).exist then
msgbox "Link Pass"
else
msgbox "Link Fail"
End IF
End IF
Next
Next

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

What is diffrence between Global variables and Environment variables...Anybody can give me answer..Thanks in advance..

3 Answers   IBM,


How to connect QTP to Testdirector

4 Answers   BirlaSoft, Polaris,


what is the smart identification techniqu?what r the different mechanisums used in it?

2 Answers   Accenture,


How to execute a winrunner script in quicktest professional (qtp)?

0 Answers  


what time u r using data driven test in ur app"

6 Answers   Accenture, IBM,






what is mercury.clipboard in qtp.where we can get this in qtp tool i.e tabs

1 Answers  


I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?

0 Answers   Wipro,


how to reverse a string with out using string or predefined function,ex:string is " i love india". the output should be like this "i evol aidni"

10 Answers   Aspire, MNC, Omega,


What is All object and Local object in Object Repositary? Explain me please.

3 Answers  


Explain measuring transaction.

0 Answers  


How to open an application through scripting?

11 Answers  


Hi All, I wanted know how does QTP identifies a DataCombo. While recording I clicked on the data combo and selected a value from the list. The click of Data Combo is recorded but the selection of the value from the list is not recorded. My application is based on VB and SQL server as the database. Please let me know as how do I record the action of selecting a value from a DataCombo list. The list is being loaded from the Database Record set.

0 Answers  


Categories