Close Window

Verb: closeWindow

Closes a window in Microsoft Windows.


closeWindow --window(Window)


Script Designer Required AcceptedTypes Description
--window Window Required Window Variable with the instance of the open window of the Windows application.
--timeout Timeout Optional Time Span, Number, Text Timeout that the command uses to check if the window has closed.


Script Designer AcceptedTypes Description
value Success Boolean Returns True if the window was closed before the timeout, and False otherwise.


A Notepad application window is opened with the Launch and Attach Window command. The Close Window command closes this window.

defVar --name notepadWindow --type Window
launchWindow --executablepath "C:\\Windows\\notepad.exe" --timeout 00:00:20 notepadWindow=value
closeWindow --window ${notepadWindow}


If the window entered in the Window command is not open, execution continues normally, the command just has no effect.

See Also

  • Attach Window
  • Cancel Token Source
  • Clear Cache
  • Click
  • Click on Cell
  • Click on Menu
  • Click on Value
  • Control Screenshot
  • Count Windows
  • Expand Tree
  • Find Window
  • Find Windows
  • Focus
  • Focus Window
  • Get Barcode
  • Get Bounds
  • Get Cell Value
  • Get Control
  • Get Image Grid
  • Get Interval
  • Get Options
  • Get Table
  • Get Table Information
  • Get Tree Nodes
  • Get Value
  • Handle Open File Dialog
  • Handle Save File Dialog
  • Launch and Attach Window
  • Launch or Attach Window
  • Launch SAP Application
  • Map Image Grid
  • Maximize or Minimize Window
  • Offset Value
  • SAP Transaction
  • Screenshot Window
  • Select Row
  • Select Tab
  • Set Execution Throttling
  • Set Grid Value
  • Set Value
  • Show or Hide Element
  • Update Window
  • Verify Enabled
  • Verify If Visible
  • Wait and Close Security Window
  • Wait Busy Window
  • Wait Control
  • Wait for Control to Enable
  • Wait for Window to Appear
  • Watch and Close Window
  • Watch and Select Client Certificate
  • Watch and Set Credentials in Browser