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 can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods
How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object
How smart identification works in qtp ?
How many types of actions are there in quicktest professional (qtp)?
Explain the use of action split in qtp?
Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?
What is QTP scenario.
What is keyword view in qtp?
Discuss quicktest professional (qtp) environment?
action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans
What are the various types of Actions in UFT?
What is an expert view and keyword view?
explain abt dyanamic changing object with example?
What are the Disadvantages of shared object repository?
If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?