Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
global object which can be called in any action
#1
Not Solved
I want to crate global object which can be called in any action i tried following code but it does not work.

Code:
Public unit

Function getunitname
         Set fso=createobject("Scripting.Filesystemobject")
         Set unit = fso.CreateTextFile "C:\QTP\xyz.txt"
End Function


on calling this in any action, it is not working

Please help
Reply
#2
Not Solved
use environment variable method...
Reply
#3
Not Solved
Plz ignore my above answer...Use


Code:
public Function getunitname
         Set fso=createobject("Scripting.Filesystemobject")
         Set unit = fso.CreateTextFile "C:\QTP\xyz.txt"
End Function
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Object not found during the 2nd iteration of an Action call in a For loop BGunay 0 973 04-23-2020, 07:08 PM
Last Post: BGunay
  Reading Global Sheet's DataTable Value Bhuvana 0 1,639 01-05-2020, 10:03 PM
Last Post: Bhuvana
  Error as Global Not defined while trying to retrieve value from Datatable siddharth1609 0 965 09-11-2019, 02:52 PM
Last Post: siddharth1609
  Sometimes there is Global datasheet. utestqa 0 2,716 10-02-2013, 07:09 PM
Last Post: utestqa
  Naming convention of datatable global sheet. TurtleRock 2 3,241 01-14-2013, 11:56 AM
Last Post: nilanjans

Forum Jump:


Users browsing this thread: 1 Guest(s)