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

Answer Posted / shekhar

''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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain in brief about the quicktest professional (qtp) automation object model?

565


In qtp, how you can use xpath to identify objects?

614


What is Cross browser testing? Does UFT support it?

617


What is the difference between rational rose and QTP?

1776


How can you pass value one action to another action?

553






can i change the runtime properties of an object ? How can i check if a parameter exists in database ?

1410


What is difference between Recording time object identification and Run time (Execution) time.

1003


How to associate function library at a run time?

700


What are the different recording modes and how do they work?

614


What is object repository in qtp?

559


What is the difference between per-action and shared?

588


Hi Guys, I want to place all of my values which i am getting it from a loop in to a global shee. For that i had written the script like this For i = 1 to ECOs-1 ECO = List(i).GetROProperty("innertext") DataTable.AddSheet("ECOList") DataTable.GetSheet("ECOList").AddParameter "ECOList",ECO AbortECO = DataTable.GetSheet("ECOList").GetParameter ("ECOList").Value msgbox AbortECO DataTable.GetSheet("ECOList").SetNextRow Using the above script, whenever the loop iterates it is creating new column "ECOLIST" in the sheet called "ECOLIST". It means, the values are displaying in the column wise even though i added the script " DataTable.GetSheet("ECOList").SetNextRow" . The cursor is not moving to the next line. Anybody help me out how to pass the values from script to the excel(Global/Local) sheet. Pls let me know @ nbabu11@gmail.com if you are not clear about the question.

1385


How do you capture tooltip using QTP?

628


How to check bitmap output value?

625


Why is action split used by qtp?

555