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.??
Answers were Sorted based on User's Feedback
Answer / 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 |
Explain in brief about the QTP Automation Object Model.
In qtp, how you can exit for loop?
How do you change Logical Name of the object in test script?
what the diffference between test data and test cases what is meant by object hierarchy in qtp
How can you give wait up to 10 seconds in qtp?
Can anybody give the script of below things. 1. Add sheet 2. Adding columns 3. Set the values in that columns(In the rows) 4. Close the sheet 5. How can we create 3 sheets in one Excel sheet??
QTP Testing Process?
How to associate shared object repository to test in qtp?
How to invoke QTP using Dos prompt ?
What are the Test design techniques you uses in ur project?
when i was doing the Flight reservation with QTP calculating the tickets i got Type mismatch: '[string: ""]' in "If cdbl(tot)=cdbl(p)*t Then" error. where I am doing the mistake Could you please tell me.
Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach