Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Concept of Init Function of class
#1
Solved: 11 Years, 4 Months ago
Hi,

I m creating a class named TestReportFile, in which i want to create Excel file. I want that on creation of object of TestReportFile class, Excel test report file should be created.
Like this:

Set obj = new TestReportFile ' This should create Excel file in required directory. And in Init() of TestReportFile class, i wrote code for creation of Excel report file. Because i assume that on creation of object Init() is called of that class. But this did not happen.

Please tell me how Init() will be called? and on creation of object of a class, does Init() is called or not? What is the usage of Init() in classes? What is the concept of constructor of a class in QTP?

Thanks
Reply


Messages In This Thread
Concept of Init Function of class - by Star - 07-31-2009, 11:42 AM
RE: Concept of Init Function of class - by Saket - 07-31-2009, 04:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  DP Encapsulation Within Class Object TheGlovner 2 1,799 10-12-2018, 02:11 PM
Last Post: TheGlovner
  Dynamic obj rep - get text in the class (html) marcio cravo moreira 0 2,130 05-26-2015, 06:58 PM
Last Post: marcio cravo moreira
  Calling a Function in Function Library when function is defined in an Action jitenderkkr 0 2,977 11-27-2014, 12:53 PM
Last Post: jitenderkkr
  can class be a variable in DP wyrdo 1 2,479 08-07-2013, 01:33 PM
Last Post: anil2u
Sad QTP Script | how to get object of some open window just using its class type,Java sophia.sabir 1 8,873 08-07-2013, 01:26 PM
Last Post: anil2u

Forum Jump:


Users browsing this thread: 1 Guest(s)