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

suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question

0 Answers  


Explain how Does Run time data (Parameterization) is handled in QTP?

0 Answers  


how can we preform retesting(DATA driven test) using function please gine the code for loginpage

0 Answers   W3 Solutions,


How to pass parameters into an action.Please explain me with examples

5 Answers  


How are actions and functions different in QTP?

0 Answers  






Hi all please solve this.It is urgent..... When I right clicked on a Web image manually It displayed Open link,open link in new window,save picture as, Email picture,Printpicture,propeties...etc. While automation I have written a code like this 'browser("Google").Page("ramseeker®: Memory and_3").Image ("graphOfModel").Click 10,10,micRightBtn But the right click menu was not displayed. I want to save that image in a seperate folder

6 Answers  


How to create Userdefined Function.Please write the steps ans also provide example where exatcly we use it.

1 Answers   HP,


If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened. What would be Descriptive programming for this in QTP using VB Script..??? Please send your answers.

6 Answers  


what is the use of VIRTUAL OBJECTS? explain ?

4 Answers  


your doing one project testing then how u know itis wheather web based application or windows based application?

2 Answers  


what type of framework u r using in ur organization

0 Answers   Wipro,


What is the default object synchronization timeout in qtp?

0 Answers  


Categories