how can I read text in browser and export the same into text
file?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different ways to invoke an application using QTP?

650


I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

1729


What is keyword view in qtp?

554


How to find operating system information using the qtp script?

587


Sql questions to find second max salary and how to use joins

969






What do you mean by checkpoints in qtp?

563


Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

1518


How to execute a winrunner script in quicktest professional?

560


how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page

1829


one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.

1529


Hi, how can we check or avoid the memory leakage in QTP9.2?

1712


What is qtpro? What is a quick test professional?

589


How smart identification works in qtp ?

583


any body can you help me what is the script to automate an comand promt

1982


Explain the benefits of quick test pro(qtp)?

573