Can you give me the code to calculate the total number of
Links using the child object in the web page..? is there
any other way to calculate number of links with out using
the Child objects.??
Answer Posted / uday kumar_anem
Set fileSysObject=createobject("Scripting.FileSystemObject")
Set
linksFileName=fileSysObject.opentextfile("D:\samplelinkfile.txt",2,true)
Set linkDescObj=description.Create
linkDescObj("micclass").value="Link"
Set noOfLinks=browser("Browser").Page("Yahoo!
India").ChildObjects(linkDescObj)
For i=0 to noOfLinks.count-1
linkName=noOfLinks(i).getROProperty("name")
linksFileName.writeline(linkName)
Next
linksFileName.close
Set fileSysObject=nothing
Here i am retrieving all the links in Yahoo home page and
writing the link names in a text files.
If you wish to verify the number of links a web page, you
can use "Standard Checkpoint".
Click on Record button ->Insert Menu -> Check point
->Standard Checkpoint -> Click on any place in the page and
select the page in the Hirarchy and observe the number of
links property/value. If the total number of links are
increased or decreased, then it will show the differences.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
please any one can explain the keyword driven framework. with gmail example.
hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?
Explain about business process component? types and usage?
What are the advantages of parameterization ?
Where to use function or action?
Write a script to customize the test results in PDF and HTML format.
Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this
How to export quicktest professional (qtp) results to an .xls file?
Some time when i wanna learn the object i face issue like i am not able learn the object in proper manner... eg:for text bo on web page it should learn as webedit but some times it reads as winobject:internetexpoler-server, because of this i have to uninstall the qtp and re-install it again when i do this it reads the object perfectly.....plz suggest the soln
write a script to verify the image path(src property) of the images which are in web pages.
Can I change properties of a test object?
What the differences are and best practical application of Object Repository?
Hi Friendss..., can any body help me.. 1. Tell me your achievements(Technically)..? 2. Tell me your strengths(Technically) and weakness(Technical)..? 3. Why are you looking for change..?
explain abt dyanamic changing object with example?
Explain the check points in quicktest professional (qtp)?