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

Dis advantages of XML checkpoint ?

1579


What do you mean by iteration?

628


what is supply chain management?

2085


Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.

1944


How to capture dynamic values in load runner and how Each of the captured values are to be written to a text file (c:\temp\LoadRunner1.txt)

1732






What is quicktest professional (qtp window?

592


Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?

1227


What is the difference between the design-time and run-time data tables?

554


I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

1514


Name the properties you would use for identifying a browser and page when using descriptive programming?

520


how to create flat file datasubmission in qtp

1898


What if recovery scenarios is also failed for identify the alert ? (We are handling unexpected popup through recovery scenarios but if still recovery scenarios also failed than what should be the approach)

1009


What do you mean by checkpoints in qtp?

556


in my application,validation message has in japanise language.how to validate this message is appears properly or not

1517


Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.

1560