Issue with UserForms display while running TestExecute using silent mode
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue with UserForms display while running TestExecute using silent mode
-Created a userform with few testxboxes to capture values while execution
- Using ShowModal displaying the userform in the script unit
-Created vbs file where we have call to testexecute and respective projectsuite and project.
While running directly from TestComplete and TestExecute, the userform is displayed when executed the project and could capture the results, but when running the same using vbs file in silent mode, the userform is not being displayed and is not giving any error message also.
Please suggest, whether I need to configure in the TestExEcute options in vbs file.
Regards
Dhirendra
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dhirendra,
> when running the same using vbs file in silent mode
I believe that this means that your .vbs file is started by the scheduler and is running unattended without any user desktop.
If the above is correct, then this is the expected behavior: your user form is opened, but it cannot be displayed as there is no user desktop. Because the form is opened as modal, it blocks test execution and there are no means to close the form because of the absent desktop. This is generic Windows behavior - no UI is allowed in the code that is executed unattended.
The only solution is either not to display the form when code is running unattended or execute it only in the active user session that has an associated desktop.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
Thank you for the information.
For ease of execution, we make use of vbs file to trigger the execution and not using scheduler.
And when we double click the vbs which has required line of code to open TestExecute with required properties, we expect the Modal pop-up to be displayed. But not being displayed. And we have dedicated desktop and we manually click the vbs file to trigger execution.
Pleas suggest.
Regards
Dhirendra
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hm-m...
And the command-line for TestExecute contains the /silent parameter, right?
As per description of the /silent parameter - it tries to close all dialog windows using the default button. Have you defined default button for your User Form? If it is not defined, does it help if you define one?
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
No silent parameter is used in the vbs file to trigger TestExecute.
And OK button of Modal userform is configured, and the requirement is to provision values to testxboxes on userform and then proceed with execution. But the modal userform itself is not getting displayed.
Sample vbs file is as below
Dim objWshell
Set objWshell = CreateObject("Wscript.Shell")
objWshell = """C:\Program Files (x86)\SmartBear\TestExecute 12\Bin\TestExecute.exe"" ""C:\SampleProjectSuite\SampleProject.Suite.pjs"" /p:""SampleProject"" /r """" /exit /timeout 7200", 0 ,true
Regards
Dhirendra
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dhirendra,
a) Why not to use just a .cmd command file with this command:
"C:\Program Files (x86)\SmartBear\TestExecute 12\Bin\TestExecute.exe" "C:\SampleProjectSuite\SampleProject.Suite.pjs" /p:"SampleProject" /r /exit /timeout 7200
b) If, for some reason you really need to use .vbs, then the code must be like this:
Dim objWshell
Set objWshell = CreateObject("Wscript.Shell")
objWshell.Run """"C:\Program Files (x86)\SmartBear\TestExecute 12\Bin\TestExecute.exe"" ""C:\SampleProjectSuite\SampleProject.Suite.pjs"" /p:""SampleProject"" /r /exit /timeout 7200"", 1, true
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
