TestCenter Reference
TestSupport.ScreenShot Namespace Reference

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

Functions

 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.
 
 createScreenShot (window, filename)
 Create a screenshot of the given MeVisLab window.
 
 canCreateScreenshot ()
 Returns whether a screenshot can be created on this hardware.
 

Detailed Description

Package to provide screenshot related support functions.

Function Documentation

◆ canCreateScreenshot()

TestSupport.ScreenShot.canCreateScreenshot ( )

Returns whether a screenshot can be created on this hardware.

Definition at line 126 of file ScreenShot.py.

◆ createOffscreenScreenShot()

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 40 of file ScreenShot.py.

◆ createScreenShot()

TestSupport.ScreenShot.createScreenShot ( window,
filename )

Create a screenshot of the given MeVisLab window.

Definition at line 89 of file ScreenShot.py.