Do we have access for BuiltIn object at Script Extensions
Hi All,
My aim is to have a method at our Script Extensions file, that would return the array of command line variables.
But it looks like we do not have access for 'BuiltIn' objects at Script Extensions, which can be used to get command line variables.
Just want to be sure about it. Also is there any other way to get the command line variables, such that it would be a global method (i.e., at Script Extensions).
Thanks,
Saravana
Update about Solution[30/3/2017]:
Too many inputs, really confused to Accept what as a solution.
Thank you so much HKosova, tristaanogre and shankar_r.
I would accept HKosova idea as a solution because he has given the insight which is what I asked for. Special thanks to tristaanogre for sharing your utilities and also to shankar_r for showing another way to deal the issue.
BuiltIn.ParamCount and .ParamStr are wrappers over Sys.Process("TestComplete").CommandLine, so you can try parsing the CommandLine string yourself. Just be aware that spaces can be part of an argument value -- if that argument is enclosed in quotes.
If you use both TestComplete and TestExecute, you'll also need to find out what the current test runner is. Maybe try Sys.WaitProcess("TestExecute") first and fall back to TestComplete.
Or go with tristaanogre's suggestion and use config files instead.