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 |
How we can differentiate between stand alone application and web application in QTP?
how can i call reusable action in a function could any one explain me?
How can we get the result from WindowsXP Command Window? (e.g. After we input 'ipconfig' in command window, how QTP get the result?)
Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)
hi,which is the best book to refer QTP 9.2 and Faq's.
How does qtp identify the object in the application?
Which scripting language used by QTP?
1.In VB Script 100 lines Script. How can check the Syntax errors? 2. Write a VB Script for X = India/Srilanka/Australia/England/South Africa.I need the Output Country wise? [ 1st Msgbox India , 2nd Msgbox Srilanka] ---- 3. How can Choose these test cases to be automated?
If enter into interviewer room? how u introduce with him. with shakehand or waht?
How does QTP identifies the object in the application
Do you know how to connect database? Can you tell me the procedures?
How can we use the "CreateObject("Wscript.Shell")" in QTP and what is the definition and purpose of it?