ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
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.??
 Question Submitted By :: Kumar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 ?    0 Yes 0 No
Uday Kumar_anem
 
  Re: 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
# 2
Hi Uday,

   its nice answer. keep it.

and also u can use html tag instead of micclass..

like

linkDescObj("html tag").value="A"

  it will perform same functionality.
 
Is This Answer Correct ?    0 Yes 0 No
Nanda
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
what is diffrense between action and function IBM3
Can you expect major bugs in Net banking Application?  1
dar Sir I am Facing th eProblem in QTP thet ,when I start thrcording inthe QTP for the ASP front end and C# the Coding Language I fing that recording is Done well for the Login screen but at the Time Running the script the QTP is Unable to Identify the Objects On the Objec Onht eLigin screen .Please answer the Question in Description and the Propables reason I might be facing alsp the Popable solution I have to Take thanks and ragards  1
What is smart identification? Ordain-Solutions1
What is Environment Variable and when we apply this in QTP?  3
can we use QTP for load testing instead of load runner?  3
Can we use same virtual objects in many number of tests? TCS1
4. How u will open the build automatically in QTP except using Systemutil.run command  3
How do you return a value for an array.  1
What is descriptive.create () in QTP?  2
Tell me Three major differences between QTP & Winrunner?  2
HoW to open QTP in Real time.after getting the qtp window how to log in .pl answer real time people GE3
What is the difference between gettoproperty and settoproperty?Explain with an example? Satyam4
Interviwer asked, How many years exper.. on QTP? I said, total 2 yrs exp in manual and QTP. QTP only current project arround 3 months. then interviewer ask , HOW BOLD YOU QTP? What you say?  1
how can i change the action path that called in other action. when i copy one action to other pc,the action"test2" calls another action(C:\test1\action0),and i update this"test1",the folder update to "action1",but when i open "test2", it just point the call path to "C:\test1 \action0", but does not update to "action1",and the change i make can be shown in test2. so, can i update the call path manully? thanks HP2
how u track bugs using Test director in manual testing. Accenture2
what is the difference between Table checkpoint and Database checkpoint in QTP Ordain-Solutions2
take one example and write vbscript on one web application in qtp? explian descriptive programe with one example? IBM2
How to add a runtime parameter to a data sheet?  4
Where should we turn Smart Identification ON in QTP?  5
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com