Forum Discussion

dhirendranaga's avatar
dhirendranaga
Occasional Contributor
7 years ago

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

5 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    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.

    • dhirendranaga's avatar
      dhirendranaga
      Occasional Contributor

      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

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        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?