how can I read text in browser and export the same into text
file?
Answer Posted / 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 |
Post New Answer View All Answers
How qtp identifies objects?
when will you do debug your script? and explain that process?
hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....
What is the difference in testing a client-server application and a web application?
How to sendKeys in QTP? Diff b/w sendkeys and device replay? Diff b/w function and Sub? Diff b/w Array and List Different Types of running Keys other than Fast, slow,Normal mode Regular expression for http://newtours.demoaut.com Difference between \w and \W How to generate script button Recording Types Different Types of Actions? Using DP performance degrades, If Yes why? How to close all the opened browsers? Diff b/w SystemUtil.Run and invoke application? If qtp not recognized the combo box How to select values from drop down?
i'm using the qtp to test to vb appliction,i wanted to get the new application's title.i didn't want to use the winAPI to get it ,i 'd like to know whether a QTP function can do it. Eg: SystemUtil.Run "C:\Program Files\.....","","","" 'run an application, and misure the application is activating,then how to get the hwn wihtout using windowns api
How can get count of list box?
How can you identify the browser and its information using the qtp script?
What are the Application Functions available in QTP?
Name the different types of recording modes?
I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=", Second button "html id:=btnSave "outerhtml:=", Third button "html id:=", outerhtml:=",
How the smart identification is used in real time?Please explain with an example
How are actions and functions different in QTP?
Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji
How to find operating system information using the qtp script?