how can I read text in browser and export the same into text
file?
Answers were Sorted based on User's Feedback
Answer / eswar
'Modified answer foe above Script
systemutil.Run "Iexplore","www.google.com","open"
wait 5
Set desc=description.Create()
desc("micclass").value="WebElement"
desc("html tag").value="P"
Dim Fso,file_loc,Fc,Forreading,d
Set Fso=createobject("scripting.FileSystemObject")
Set Fc=Fso.CreateTextFile("D:\akh.txt",8)
Set a=browser("title:=.*").page("title:=.*").ChildObjects(desc)
b=a.count
msgbox b
For i=0 to b-1
d=a(i).getroproperty("outertext")
a(i).highlight
' print "Text -->" & d
MsgBox d
Fc.writeline"The text is : "&d
Next
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / akhaleshyadav1985
systemutil.Run "Iexplore","www.gmail.com","open"
wait 10
Set desc=description.Create()
desc("micclass").value="WebElement"
desc("html tag").value="P"
Set a=browser("title:=.*").page("title:=.*").ChildObjects(desc)
b=a.count
msgbox b
For i=0 to b-1
d=a(i).getroproperty("outertext")
a(i).highlight
print "Text -->" & d
Next
Dim Fso,file_loc,Fc,Forreading,d
Set Fso=createobject("scripting.FileSystemObject")
Set Fc=Fso.OpenTextFile("C:\aa\akh.txt",Forwriting,true)
Fc.Writeline(d)
Akhalesh Yadav
9555717928
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / uday
If u r looking the source code of a browser:
http://hpsqtp.blogspot.in/2012/03/how-to-get-source-code-of-webpage-using.html
Is This Answer Correct ? | 1 Yes | 1 No |
''Take a value from application and copy it into the text
and excel file.
a=
Browser("CreationTime:=1").Page("Micclass:=page").webButton("html
id:=ctl00_contplhDynamic_imgSignIn").GetROProperty("name")
Set fo=CreateObject("scripting.FilesystemObject")
Set otext=fo.CreateTextFile ("c:\Text11.txt")
''otext.Write a
Set oExcel=CreateObject("Excel.Application")
oExcel.Visible=True
Set oWorkBook=oExcel.Workbooks.Open("c:\Test11.xls")
Set oWorkSheet=oWorkBook.Worksheets("Sheet1").cells(1,1)
oWorkSheet.value=a
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rohit pathak
file name.Export("C:\Results\file name.xls")
First you have to tell which file you want to export and
then where you want too export that file.
Is This Answer Correct ? | 0 Yes | 2 No |
How many types of recording facility are available in QTP?
Can launch two instances of qtp on the same machine?
What is the limitation to XML Checkpoints?
What is your role and responsibilities in QTP with your current organization?
Hi, is it possible for recording shortcut key during record session? The application on which I am working is web based application. This application has several shortcut key associated with menu option. I have succesfully recorded all menu option but unable to record shortcut key.
how qtp handles customised object
how we connect oracle or sql data server database to qtp
How to use Regular Expressions in QTP? give an example.
10 Answers ABC, Accenture, Ordain Solutions, SCL,
Will QTP gets installed on virtual PC.What is the maintenance number to be given
Pls Solve Error(SAP-CRM):- Cannot identify the specified item of the SAPNavigationBar object.Canfirm that the specified item is included in the object's item collection.
how u write vb script in qtp pls give me some basic script and some material
32 Answers Datamatics, UHG, Winit,
I have given u a application.To automate it what are the things will u consider?