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

how can i use text check point in descriptive programming. or else is there any way to compare the text in the application and the text in data table.

2 Answers  


How do I generate Test Results window using descriptive method ( run time ) after my test execution process? Please have a look of my below code. ========================================================= Dim qtApp Dim qtTest Dim qtResultsOpt Set qtApp = CreateObject("QuickTest.Application") qtApp.Launch qtApp.Visible = True qtApp.Options.Run.CaptureForTestResults = "Always" qtApp.Options.Run.RunMode = "Fast" qtApp.Options.Run.ViewResults = True qtApp.Open "C:\Automation\Example", True Set qtTest = qtApp.Test qtTest.Settings.Run.OnError = "NextStep" Set qtResultsOpt = CreateObject ("QuickTest.RunResultsOptions") qtResultsOpt.ResultsLocation = "C:\Automation\Example\Res1" qtTest.Run qtResultsOpt MsgBox qtTest.LastRunResults.Status qtTest.Close Set qtResultsOpt = Nothing Set qtTest = Nothing Set qtApp = Nothing ========================================================== This code is working fine, but Test Result window is not displaying after execution. Anybody can please help me regading the same. Thanks Akshaya Madali Capgemini India Pvt Ltd 9823213538

0 Answers   Cap Gemini,


HOW MANY WAYS ARE THERE TO CPY TEST IN TEST LAB

2 Answers   IGT,


Can you expect major bugs in Net banking Application?

1 Answers  


What are the 3 main stages involved in testing with qtp?

0 Answers  






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

0 Answers  


what is reusable action and how the same can be implemented (process)?

2 Answers  


There are 3 types of frame works in QTP 1. Linear frame work 2. Modular frame work 3. Key word driven frame work. Can any body explain the above 3 frame work models. y2k_ram2000@yahoo.com

6 Answers   Fidelity, GDS, IBM, TCS, Wipro,


Hi Frenz... I would like to take up the QTP certification . Can anyone tell me what is the procedure. n if anybody have the study materials pls fwd it to jkpunathil@gmail.com

0 Answers  


Tell me about your project? please help me how to tell about insurance project

0 Answers   Cap Gemini,


hi what is the use of "dim" in automation objective model or any where what is the use of "dim" plz tell me

3 Answers  


can we change the name of a check point? when will you start writing testcases? do you follow any methodology for writing test scripts? qtp is key word driven testing or data driven testing?

2 Answers  


Categories