Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Handling file in QTP
#3
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi Saket,
I am trying as you have said but getting the invalid call procedure or argument.
My code is:
Code:
Dim fso, tf
   Set fso = CreateObject("Scripting.FileSystemObject")

    If (fso.FileExists ("c:\testfile.txt")) = True Then
Set tf = fso.OpenTextFile("c:\testfile.txt", ForAppending, True)

Else
   Set tf = fso.CreateTextFile("c:\testfile.txt", True)
  
   End If
   ' Write a line with a newline character.
'  tf.WriteLine("CashOnHand    TotalPortfolioWorth    ShareHoldingValue")
   ' Write a line.
   tf.Write (CashOnHand&"    "&TotalPortfolioWorth&"    "&ShareHoldingValue)
   tf.Close

Please correct me where i am wrong.

Thanks;

Ajit
Reply


Messages In This Thread
Handling file in QTP - by Ajit.2k6 - 03-05-2010, 06:21 AM
RE: Handling file in QTP - by Saket - 03-05-2010, 12:05 PM
RE: Handling file in QTP - by Ajit.2k6 - 03-05-2010, 01:16 PM
RE: Handling file in QTP - by Saket - 03-05-2010, 02:14 PM
RE: Handling file in QTP - by Ajit.2k6 - 03-08-2010, 05:32 AM
RE: Handling file in QTP - by Saket - 03-08-2010, 09:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Difference between error handling and exception handling venkatbatchu 6 26,586 12-11-2018, 05:11 PM
Last Post: smitapawar610
  QTP hangs on handling error window dtamilarasan 1 3,799 06-04-2013, 02:45 PM
Last Post: basanth27
  QTP script to save the generated .csv file and excel file priya elangovan 0 4,401 08-29-2012, 04:17 PM
Last Post: priya elangovan
  Handling Flash components through QTP...? venkat_1241 1 3,927 06-23-2010, 10:55 AM
Last Post: Saket

Forum Jump:


Users browsing this thread: 2 Guest(s)