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
How you calling actions in qtp?
What is output value? How many types of output values are there in qtp?
write a script to verify the image path(src property) of the images which are in web pages.
what is Property......End Property loop? how to write sript for it in QTP
How does you pass optional arguments in qtp?
What is the standard timing delay for web based application in qtp?
Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?
How will we compare the texts in the two word files using QTP writing the script in Descriptive Programming. Thanks
With what extension you can save the list of tests in a file to run in test batch runner?
How will you check that your test cases covered all the requirements?
Hi All, I need code for how to execute qtp scripts from excell sheet
I am getting the "test object property" Description properties "toolkit class" value By using "gettoproperty" in run time But my problem is how to get Ordinal Identyfier's type and value Type is index, value is 0 How can i keep this values in to required place How can i get these values in runtime I have to insert these "index" and "value" into another area Is there any script for this like "gettoproperties","Getroproperties" If anybody knows,please help me .
what type of automation is follwed in the project?
can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks
Why to use descriptive programming?