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 |
What is a reusable action?
How to insert a check point to a image to check enable property in QTP?
What does SPLIT and JOIN commands do in Vbscript?
6 Answers Ordain Solutions, UBC,
How do you data drive an external spreadsheet?
how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel
Describe the differences between functions and actions in UFT?
how to click on object? (with out knowing the object details) for ex: in a webpage one link is available.i want to click that link by using one menthod through qtp?
How we will execute(run) the scripts in qtp 8.2?
what is the difference between parameters and arguments?
write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading
Explain Descriptive Programming Types with Examples?
how do you run scripts in QTP?please anyone can answer my questions