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
Answers were Sorted based on User's Feedback
Answer / chaitu.c
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 |
Answer / chaitu.c
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 |
Answer / chaitu
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 |
Answer / guest
Good Question.......
here i used regular expressions concept with descriptive
prgming...Rough idea given to u...surely this approach can
work out...
Set opage=browser("Gmail: Email from Google").Page("Gmail:
Email from Google")
Set childobjdes = Description.Create()
childobjdes("mic class").value="Web Element"
childobjdes("html tag").value=".*[A-Za-z0-9].*"
childobjdes("outer text").value =".*[A-Za-z0-9].*"
set allobj = opage.ChildObjects(childobjdes)
msgbox allobj.count
For i=1 to allobj.count-1
text=text&allobj(i).getroproperty("outer text")
Next
msgbox text
Is This Answer Correct ? | 0 Yes | 1 No |
Shall we add Local Repository to shared object repository,if yes,how we add
what are the drawbacks for record and payback in qtp
Can we Test Welcome Screens and Process Images with QTP
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.??
2 Answers DST Global Solutions,
Give me brief idea about QTP automation object model?
what is Supplemental Objects ?
Can you import and export data from XLS and how?
what are recovery management techiniques?
It is regarding VBScript, how to export our function results to ExcelSheet through VBscripting. Ex: I have written add function, that result should export to Excel.
I am a beginner plz tell me,how do we write scripts in QTP? In my opinion we can write scipts in expert view or there is another option where we can write scripts. plz tell me.
What is the difference between functional spec. and Business requirement specification?
Please let know the scripts for counting number of repeated letters in the word. Note repeated letter should not be count agian. Ex: If "Hello" is my word... l is coming twice.. it should count once and print... secong 'l' should not count again..