TestCenter Reference
TestSupport.ScreenShot Namespace Reference

Package to provide screenshot related support functions. More...

Functions

def createOffscreenScreenShot (SONodeName, filename=None, transparencyType=None, size=None, backgroundColor=None)
 Create an screenshot of the given Inventor node that must be present in the given context. More...
 
def createScreenShot (window, filename)
 Create a screenshot of the given MeVisLab window. More...
 
def canCreateScreenshot ()
 Returns whether a screenshot can be created on this hardware. More...
 

Detailed Description

Package to provide screenshot related support functions.

Function Documentation

◆ canCreateScreenshot()

def TestSupport.ScreenShot.canCreateScreenshot ( )

Returns whether a screenshot can be created on this hardware.

Definition at line 130 of file ScreenShot.py.

◆ createOffscreenScreenShot()

def TestSupport.ScreenShot.createOffscreenScreenShot (   SONodeName,
  filename = None,
  transparencyType = None,
  size = None,
  backgroundColor = None 
)

Create an screenshot of the given Inventor node that must be present in the given context.

The image is saved in png format and with the filename being the hash of image's content. @parem filename Name of the screenshot file. The file will be saved in the current function's result directory. If a file with the given name exists the function fails and returns None.

Parameters
SONodeNameName of the inventor output field to create screenshot of.
transparencyTypeType of transparency to be used.
sizeTuple with values for x and y dimension.
backgroundColorset background color for scene (3-element tuple/list, individual values have to be in [0,1])
Returns
Path to screenshot file. None if creating screenshot failed.

Definition at line 44 of file ScreenShot.py.

References TestSupport.Fields.touch().

◆ createScreenShot()

def TestSupport.ScreenShot.createScreenShot (   window,
  filename 
)

Create a screenshot of the given MeVisLab window.

Definition at line 93 of file ScreenShot.py.