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

Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

2070


what is profile tool?

1617


There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code

1214


In QA Testing when do you use Loadrunner vs QTP? What are the main differences between those two tools? Explain the purpose with real world scenario examples...In advance thank you!!!

2388


supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?

1364






Where we use data driver in qtp?

613


What are the different types of checkpoints?

591


Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

1518


What are the differences between qtp and winrunner?

539


Can any give an example(if possible templates) how to test web application using QTP. thanks in advance

1561


Have you used xml check point in your project?

558


On what document base Descriptive programming is written if build is not yet ready ?

882


what is the latest version of QTP? Main difference between 9.2 and 10 version

1556


How the smart identification is used in real time?Please explain with an example

1551


Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)

1459