Ask a Question

Manual Testing Combined With Automated

shillijf
Occasional Contributor

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
Jim
3 REPLIES 3
shillijf
Occasional Contributor

RE: Manual Testing Combined With Automated

Using TC6
Jim

RE: Manual Testing Combined With Automated

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
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
shillijf
Occasional Contributor

RE: Manual Testing Combined With Automated

Thanks very much
Jim
cancel
Showing results for 
Search instead for 
Did you mean: