Forum Discussion
- baxatobCommunity Hero
- tristaanogreEsteemed Contributor
You could also just fire up a shell and call the Exec method.
Sys.OleObject("WScript.Shell").Exec("cmd /c ""C:\MyDir\MyBat.bat""")
- vikram_u_kContributor
Hi Support,
Thank you for the quick response.
I just needed a clarification on this question regards the arguments to be passed for the executable.
I have a exe which i call with 2 Arguments( ex: ABC.exe Param1 Param2). In the TestedApps i note that the ABC.exe is listed with commandline parameters as "Param1 Param2".
Is there a way to change/parameterise the second argument alone(Param2)?.
Thanks and with regards,
Virkram U
- tristaanogreEsteemed Contributor
You should be able to access the parameters using the TestedApps object. See the reference at https://support.smartbear.com/viewarticle/75248/ for the example.
Essentially, you would access the SimpleParams object of your tested app, change the parameter to only include param 2, activate, and then run your app.
- m_essaidValued Contributor
I use cmd alot now, I create environments for my apps.
for example :
first, I kill all cmd processes
then :
TestedApps.Add('cmd.exe', 'mylocation\mybatchfile.bat', 1, true, '');
TestedApps.cmd.Run;
Then I wait till the end of the batch execution with this wait procedure
p := Sys.FindChild('ProcessName', 'cmd');
while p.Exists do
begin
IsClosed:= p.WaitProperty('Exists', False);
if not IsClosed then
Delay(3000, 'I wait for the end of the files copy');
p:= Sys.FindChild('ProcessName', 'cmd');
end;- vikram_u_kContributor
Thanks Guys,
I saw that the approach calls for creating commandlines which create new TestedApps which can be validated early.. user inputs with command arguments can be created in advance,
Edit: Is there a specific reason we have debug, profile options?.
I got the Results from this Link.. https://support.smartbear.com/viewarticle/70910/
The application "MyTestAndroid\TestedApps\TestedApp.exeArgument1 Argument2" started. 18:22:34 Normal
Application domain created: DefaultDomain 18:22:34 Higher
Thread Create ID: 53324 18:22:34 Higher
Thread Create ID: 58744 18:22:34 Higher
Module Loaded: C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlibThanks a Lot guys for the Support.:heart:
Related Content
- 4 years ago
- 2 years ago
Recent Discussions
- 4 days ago
- 4 days ago