Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading a file content which created by QTP
#3
Solved: 11 Years, 4 Months ago
Hi Rajashekar,

Just check with the below way :

Initallt add the browser,page,Webedit objects (Google Page) into OR properly.

Here i have used Opentextfile method(anyhow this method will creates the textfile implicitly)

Add the below code & execute .......

Code:
Dim fso,f,f1
Const ForReading = 1, ForWriting = 2
Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.OpenTextFile("c:\testfile.txt", ForWriting, true)
Stroutput=browser("Google").Page("Google").WebEdit("q").GetROProperty("Value")
f.write(Stroutput)

set f1 = fso.OpenTextFile("c:\testfile.txt", ForReading,true)
msgbox f1.ReadAll


the above code is working fine.Smile


_____________________________________________________________
Reply


Messages In This Thread
RE: Reading a file content which created by QTP - by sreekanth chilam - 03-18-2009, 12:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading Global Sheet's DataTable Value Bhuvana 0 1,634 01-05-2020, 10:03 PM
Last Post: Bhuvana
  how to write the content obtained using the method GetPdfText Anisha 1 1,443 11-20-2017, 10:00 PM
Last Post: zunebuggy
  Reading Value from Java Table arjun.singh 8 24,388 10-11-2017, 02:51 PM
Last Post: sivaji
  Reading data from excel sheet serenediva 1 9,598 03-03-2017, 10:07 AM
Last Post: vinod123
  QTP not reading all properties ishan.mahajan@adp.com 2 2,491 05-04-2016, 10:50 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 2 Guest(s)