how do check the links in a webpage ?

Answer Posted / bfakruddin

exp="Link Name" '''

' You can get LINK Properties from any where.... Like
passing parameter value from external source like
DataTable, Environmental Variables, Externally
using "inputbox", etc.,

dim des

set des=description.create

set lnk=browser("...").page("...").childobjects(des)

for i=0 to lnk.count-1

act=lnk(i).getroproperty("outerhtml")

'act=browser("....").page("....").link("...").getroproperty
("outerhtml")

if (exp=act) then

reporter.reportevent micpass,"Link is found","Test is
passed"

End For

else

reporter.reporterever micFail,"Link is not found","Test is
Failed"

End if

Next

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you identify the browser and its information using QTP script?

775


How to release all resources file from the QTP?

1266


What are the advantages of Object Repository?

816


Key word driven framework

1910


In qtp, how you can exit for loop?

727


how do you parameterize search button from the website? the page is a single winobject and i have made a virtual object button of search button but search box can't be converted into a winedit and if we try to convert it into winedit the value we enter in a searchbox appears as numbers in the script so we arent able to parameterize.help!!!

1956


How is a Step generator used in UFT?

896


Where should i find checkpoint and virtual objects's Object properties and values in the QTP 9.2 Means where checkpoints or virtual objects related data will store If i want to get the runtime object properties how can i use Getroproperties on Checkpoints

1681


please post the interview questions for QA position in FACTSET

4190


Explain the types of properties that quick test learns while recording?

782


HOw to add the recovery file at runtime to the test file .

1774


What is data driver in qtp?

767


What is checking bitmaps?

779


What is the meaning Work bench?

1963


How do you send email with attachment from outlook using qtp ?

765