Posts: 516
Threads: 17
Joined: Jul 2009
Reputation:
3
10-13-2010, 11:27 PM
We can use the 2 options, but I will prefer the First one. This will reduce the maintainence if there are any changes to the file names or even file location.
Thanks,
SUpputuri
Posts: 146
Threads: 50
Joined: Dec 2008
Reputation:
1
10-14-2010, 03:48 PM
I hope that is not a big difference. even we should not conclude the ExecuteFile is best method with the reason given by you.
why qtp have these two methods? and what are the differences?
Posts: 50
Threads: 2
Joined: Jun 2009
Reputation:
0
10-14-2010, 07:29 PM
Following are the few differences:
1. We have a Library File with following Functions One Public and another Private:
Public Function myPublicFun()
msgbox "I am a public function"
End Function
Private Function myPrivateFun()
msgbox "I am a Private function"
End Function
If we use ExecuteFile method to load the library file, we will be able to access the private function directly. But if the same file is associated we won't be able to access private functions directly (Type Mismatch Error will be thrown).
Please Note that the functions are not inside a class.
2. With ExecuteFile method debugging of your class/Functions become difficult as F11/Step into feature does not work properly.
Regards,
Rajeshwar
Posts: 146
Threads: 50
Joined: Dec 2008
Reputation:
1
11-02-2010, 07:11 PM
Public Function and Private function both are in one library... We can use these both when ever we want, even it is called by ExecuteFile or associated file... I didn't find any difference here. Could you please explain regarding this?
Debugging can't be done if we go with ExecuteFile.