0

I am creating automation tests using Squish, application depends on hardware, so I cannot kill application from processes because it is not good for hardware. When test cases are failed, the script just clicks the Shutdown button. But I don't know the state of application in advance and the Shutdown button could be obscured by other windows, so I need to find the top or active window and close it first.

Is there any way to find the top or active window in Squish? I am using python for Qt application.

kwit04ka
  • 11
  • 5
  • 4
    Found a solution. I used `QApplication.activeWindow()`. – kwit04ka Oct 14 '21 at 03:22
  • That aside, there is also [ToplevelWindow.focused()](https://doc.froglogic.com/squish/latest/rgs-squish.html#ToplevelWindow.focused-function). – frog.ca Oct 14 '21 at 11:36

0 Answers0