Forum Discussion

shillijf's avatar
shillijf
Occasional Contributor
14 years ago

Manual Testing Combined With Automated

Is there a way to change the configuration or behavior of the manual test dialog
boxes so they're not always on top?



I'm working on automating some portions of manual tests or pausing automated tests for some manual intervention.  I'd like the Test Description box to appear on top, then disappear or otherwise be out of the way after the user presses "Begin test".  I'd like the Test Step box to go away if the user clicks on the desktop.  Presently, a dialog box is configured as always on top and gets in the way of the user or TC/TE clicking items on the screen. 



The system under test is a dual monitor medical imaging workstation with a system control monitor and an image display monitor.  The present workaround is to instruct the user, in the first dialog box displayed, to drag the dialog box to the image display monitor. After moving the first box, all subsequent dialog boxes occur in the same place.



Thanks

3 Replies

  • Hi Jim,



    Minimizing the "Step Description" dialog was implemented in TestComplete 7. I recommend that you consider updating to this TC version.



    If this suggestion is not acceptable for you, in order to minimize the dialog, to the OnBeforeStep event handler, you can add code that will apply the WS_MAXIMIZE and WS_MINIMIZE styles to the "Step Description" dialog window by using Win32 API functions. Please see the OnBeforeStep Event, Handling Events With TestComplete articles and the following MSDN articles for more information: 

    http://msdn2.microsoft.com/en-us/library/ms633591.aspx


    http://msdn2.microsoft.com/en-us/library/ms633545.aspx




    The following script demonstrates this approach:


    Sub GeneralEvents_OnBeforeStep(Sender, StepParams) 

      Dim wStepDescription


      Set wStepDescription = Sys.Process("TestComplete").Window("TtcManualTesting_RunDialogForm")




      ' Applies the WS_MAXIMIZEBOX and WS_MINIMIZEBOX styles to the window


      Call Win32API.SetWindowLong(wStepDescription.Handle, GWL_STYLE, _ 


        wStepDescription.WndStyles OR WS_MAXIMIZEBOX OR WS_MINIMIZEBOX)


      


      ' Updates the window


      Call Win32API.SetWindowPos(wStepDescription.Handle, HWND_NOTOPMOST, _


        0, 0, 0, 0, SWP_NOMOVE OR SWP_NOSIZE OR SWP_NOZORDER OR SWP_FRAMECHANGED)


    End Sub