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   SiteMap shows list of All Categories in this site.
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
Hello,

Can we capture only the labels of the web page in the 
object repository. If yes, then how.

Actually my scenario is:
I have to capture all the label of mercury site 
http://newtours.mercuryinteractive.com/tour/mercurypurchase.
php.
and want to copy all these labels in the notepad.

So,please help me how to do this all.


Thanks in advance,
Gaytri
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Hello, Can we capture only the labels of the web page in the object repository. If yes, then how. Actually my scenario is: I have to capture all the label of mercury site http://newtours.mercuryinteractive.com/tour/mercurypurchase. php. and want to copy all these labels in the notepad. So,please help me how to do this all. Thanks in advance, Gaytri
Answer
# 1
This is process of the above asked question
step1 QTP Tool put in Record mode after that
step2 Double click on the internet explore 
Step3 enter the web site 
step4 after enter the we site stop the recoreding in QTP 
after you will get the following lines( 2,3,5,8)of code in 
QTP

Line: 1 Dim a,b 
Line: 2 Window("Program Manager").WinListView       
("SysListView32").Activate "Internet Explorer"
Line: 3 Browser("Browser").Page("Page").Sync
Line: 4 b = Inputbox("Enter the Site")
Line: 5 Browser("Browser").Navigate b
Line: 6 a = Browser("Browser").Page("ALL  
Interview .com ::").GetROProperty("url")
Line: 7 msgbox a
Line: 8 Browser("Browser").Page("ALL 
Interview .com ::").Sync
'Create the Notepad file and Save the url in that
Dim fso, MyFile
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set MyFile = fso.CreateTextFile("D:\Documents and 
Settings\Administrator.SEERVER\Desktop\chaitu.txt", True)
   MyFile.WriteLine(a)
   MyFile.Close
 
Is This Answer Correct ?    0 Yes 0 No
Chaitu.c
 
  Re: Hello, Can we capture only the labels of the web page in the object repository. If yes, then how. Actually my scenario is: I have to capture all the label of mercury site http://newtours.mercuryinteractive.com/tour/mercurypurchase. php. and want to copy all these labels in the notepad. So,please help me how to do this all. Thanks in advance, Gaytri
Answer
# 2
Browser("Browser").Page("Welcome: Mercury Tours").WebEdit
("userName").Set "chaitanyakumar2005"
a = Browser("Browser").Page("Welcome: Mercury 
Tours").WebEdit("userName").GetROProperty("name")
msgbox a
Browser("Browser").Page("Welcome: Mercury Tours").WebEdit
("password").SetSecure "462974ae67a58c7d26974858f8a5b00fa630
"
 
Is This Answer Correct ?    0 Yes 1 No
Chaitu.c
 
 
 
  Re: Hello, Can we capture only the labels of the web page in the object repository. If yes, then how. Actually my scenario is: I have to capture all the label of mercury site http://newtours.mercuryinteractive.com/tour/mercurypurchase. php. and want to copy all these labels in the notepad. So,please help me how to do this all. Thanks in advance, Gaytri
Answer
# 3
Line: 1 Set a = Browser("Browser").Page
("Page").StaticLabeltext 

Line: 2  msgbox a

Step:3
'Create the Notepad file and Save the url in that

Dim fso, MyFile
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set MyFile = fso.CreateTextFile("D:\Documents and 
Settings\Administrator.SEERVER\Desktop\chaitu.txt", True)
   MyFile.WriteLine(a)
   MyFile.Close
 
Is This Answer Correct ?    0 Yes 1 No
Chaitu
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
Hi Friends... What you are doing in Regression Testing and how many test cases you ran in regression testing... suppose there is 1000 test cases is there how many test cases again you run .. 1000 test caes r how many... thanx in advance..  6
What are default add-ins in qtp? Semantic-Space8
How we can add actions in the test using QTP?  1
How can i count "spaces" in any sentence or a string if suppose " It is a Testing question" Here we have 4 gaps(spaces) Is there any function to find out spaces between words Livetek3
Cn u please clarify my doubt Where are micTab and micReturn used.Thanx in Advance  1
At a time how many users can access QTP?  4
What r the diffrernt file extentions in QTP?  2
How can we fill data in a text box without recording using object spy. Can you please provide the steps... TCS1
how to add a runtime parameter to a data sheet?  4
what is descriptive.create()in qtp?  3
User defined function in QTP Lehman-Brothers2
why we use environment variables  4
Hoe we can export TEST RESUALT IN to XL-sheet? IBM1
What are the disadvantages of Recovery Scenarios in QTP ?  1
Anybody explain me, the concept of checkpoint declaration in the QTP mainly for the Objects, Pages, Text and Tables ?  1
How to Test the mainframe application?(tell me few basic things) Covansys1
How do u use Database checkpoints and what are the use? Qualtree-Solutions4
normally by going through the object properties in object spy we write descriptive programming(correct me if i am wrong). But how or from where can we get the object properties in the object spy?plzzzzzz do answer  2
Test cases for Traffic Signals AppLabs4
What is the need and applications of learning VB script for a automation(QTP) engineer ain Realtime ?  1
 
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