how do check the links in a webpage ?
Answers were Sorted based on User's Feedback
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®ards
hemanth baabu..!!
Is This Answer Correct ? | 4 Yes | 0 No |
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 |
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 |
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 |
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 |
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 |
How to export QTP results to an ".xls" file?
in qtp wha t is synchronisatin pt,what is the maximam time out
How to retrive XML file data in QTP ? using Script(Chandana)
When to use Descriptive programing?
If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened. What would be Descriptive programming for this in QTP using VB Script..??? Please send your answers.
How can i use Output Check points in QTP
What does ".mst" stands for? (abc.mst)
What is the difference between CVS and VSS? Are you store QTP SCRIPT In VSS OR CVS? Where you store QTP Script?
1 Answers Brain Roots, Ordain Solutions,
can u tell me website address of VBscript with examples.
I am using descriptive programming for my project.when QTP deosn't identity or recognize a object by record and playback method,is it possible to make QTP identify that object using descriptive programming? Note: The object doesn't have unique properties and same properties used in Record and playback are only available, no extra properties are defined.
what is key word driven frame work how to use keyword driven frame in QTP in a project
will QTP accepts javascript?