Screenshot Window

Verb: printWindow

Available from: <Standard>

Takes a screenshot of a window.

Syntax

printWindow [--safesearch(Boolean)] [--window(Window)] (Image)=value

Inputs

Script Designer Required AcceptedTypes Description
--safesearch Safe Search Optional Boolean When enabled, focus on the window and get a higher quality image.
This setting slows down execution.
--window Window Optional Window Window for the screenshot.
When this parameter is left blank, the screenshot is obtained from the window currently attached to the context.

Outputs

Script Designer AcceptedTypes Description
value Image Image Returns the image obtained from the screen.

Example

The Launch and Attach Window command opens a Notepad window. Then, the Screenshot Window command takes the screenshot of the window and returns it as an image in a variable. With the Save Image command, it is possible to name and save the image in an informed directory.

defVar --name notepadWindow --type Window
defVar --name imageName --type Image
defVar --name desktop --type String
defVar --name imagePath --type String
getSpecialFolder --folder "Desktop" desktop=value
launchWindow --executablepath "notepad.exe" notepadWindow=value
printWindow --safesearch  --window ${notepadWindow} imageName=value
saveImage --image ${imageName} --directory "${desktop}" --file windowImage --format "Png" imagePath=value
logMessage --message "${imagePath}" --type "Info"
// Take a screenshot of an open Notepad window.
In the Directory parameter of the Save Image command, the directory where the image should be saved must be informed.

See Also

  • Attach Window
  • Cancel Token Source
  • Clear Cache
  • Click
  • Click on Cell
  • Click on Menu
  • Click on Value
  • Close Window
  • 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
  • Select Row
  • Select Tab
  • Set Execution Throttling
  • Set Grid Value
  • Set Value
  • 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