07-31-2009, 11:42 AM
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
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