how do check the links in a webpage ?

Answers were Sorted based on User's Feedback



how do check the links in a webpage ?..

Answer / hemanth baabu

For Ex..
"oDesc is the new descrption"
"objlink" is the object which we save alla the links..,

then..,
ex.prm:-
Set oDesc = Description.Create()
oDesc("micclass").Value="Web Link"
Set objlink =
Browser("micclass:=Browser").Page("Browser:=Page").Childobject(oDesc)
NumberOfLinks = objlink.count
msgbox NumberOfLinls

then in msg box the number of links will be opend..,

as per my knowlwdge this is the answer...

thanks&regards
hemanth baabu..!!

Is This Answer Correct ?    4 Yes 0 No

how do check the links in a webpage ?..

Answer / sri satya

Hi
You can check links in aweb page by using the following
script:
if Browser(title:=BrowserName).Page(title:=TitleName).Link
(name:=LinkName).Exist then
msgbox "pass"
else
msgbox "fail"
end if

Is This Answer Correct ?    3 Yes 0 No

how do check the links in a webpage ?..

Answer / 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

how do check the links in a webpage ?..

Answer / prashant

You can check it using
?if obj_ChkDesc(?html tag?).value = empty then?

If it is wrong tell me...

Is This Answer Correct ?    0 Yes 0 No

how do check the links in a webpage ?..

Answer / abhesheke

it is even possible with page check point i feel

correct me if i am wrong

Is This Answer Correct ?    0 Yes 0 No

how do check the links in a webpage ?..

Answer / deven mehta

Set desc = description.Create
Desc(“micClass”).value = “Link”
Set obj_link = Browser(“creationtime:=0”).page
(“title:=.*”).childobject(desc)
Msgbox obj_link.count
Datatable.globalsheet.addparameter”Link_Google”,”
For I=0 to obj_link.count –1 step 1
Datatable.setcurrentrow(I+1)
‘datatable(“Links_google”)=obj_link(i).getroproperty(“name”)
If NOT strcomp(datatable(“Link_Google”).obj_Link
(i).getroProperty(“name”) = 0 then
Reporter.reporterevent.micfail.”google_page”.datatable
(“Links_Google”)&”Not found”
End if
‘Mesbox obj_link(i).getRoporperty(“name”)
Next
‘Datable.export”C:\google_links.xls”

Is This Answer Correct ?    0 Yes 0 No

how do check the links in a webpage ?..

Answer / purni

Checkpoint all ways matches the test time properties withe
the run time properties. Images and links in the
application are checked by using page checkpoint. But when
recording you need to wait until the page loads fully. If
the page is not loaded fully, after we applied the
checkpoint it'll fail because it'll recognise only few
images and links that are loaded in the application before
the recording.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

how to write testcases for web based insurance,from the script by using qtp.

1 Answers  


How many types of object repository in qtp?

0 Answers  


HOW DO U CALL A ACTION IN QTP?

2 Answers   BirlaSoft,


I am having trouble understanding #1 how to paramaterize a userid and password that I need to call in about 25 existing scripts. I need to know how to Create a Reuseable action for 25 existing scripts that will call the exact same userid and password? I need to know how to create a Reuseable action and then have it called by existing scripts being run in a batch.

2 Answers  


What is checkpoints for quicktest professional (qtp)?

0 Answers  






A web page has two butons with same properties and rotating in clockwise direction. how to click on any of the button?

2 Answers   Virtusa,


How to recognize and read data from pdf file using Descriptive Programming in QTP?

1 Answers   Satyam,


How to create configuration scripts

1 Answers  


How To Export The Screen Shoots Along With The Test Reports In QTP Version 10? Thanks In Advance SenthilKumar

1 Answers  


what is the structure for the data driven framework

0 Answers   Wipro,


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  


What is the extension of the recovery scenario file in qtp?

0 Answers  


Categories