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


Please Help Members By Posting Answers For Below Questions

What are the two types of repositories available, explain them?

592


Qtp has been installed on my pc but recently ON opening it is giving this error PLEASE REPLY IT IS URGENT IT WAS WORKKING FINE QTPRO.EX THE instruction at "0x7.. ...". referenced memory at "0000....The memory could not be read... Awaiting QTP XPERTS REPly URGENT

2051


How to test results for qtp ?

782


What are metrics and matrix?

1363


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1619






we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?

1579


How to open a new test using quicktest professional?

569


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

2865


Explain Descriptive Programming Types with Examples?

921


when will you do debug your script? and explain that process?

1451


What is difference between design time and run time data table?

585


what is the diff b/w assistive and mandatary rules of object repository in QTP???

1604


How many tabs are available in debug viewer pane?

645


What is the difference between per-action and shared?

588


Hi I have exp in manual testing and planning to move in automation testing qtp(9.2).So can help me how to automate customer relationship management tool using qtp and vb script this tool already developed so how can I test it whatever maintaining by development team like documents,various options just give the whole life cycle thanks in advance

1539