original_docstring: 
  		Captures a full screen image, saves it into the specified file and logs in the Robot test log.		
  		_Parameters:_
  			- *FilePath* - optional, relative to the current Robot Framework Output Dir. If not specified, the default name is used.
  		
docstring: Captures a full screen image, saves it into the specified file and logs in the Robot test log.
  *FilePath* - optional, relative to the current Robot Framework Output Dir. If not specified, the default name is used.
docstring_tokens: Captures a full screen image saves it into the specified file and logs in the Robot test log . * FilePath * - optional relative to the current Robot Framework Output Dir . If not specified the default name is used .
code: def _takeScreenshot(self, FilePath = ''):
  		"""
  		Captures a full screen image, saves it into the specified file and logs in the Robot test log.		
  		_Parameters:_
  			- *FilePath* - optional, relative to the current Robot Framework Output Dir. If not specified, the default name is used.
  		"""		
  		# Check that PIL is installed
  		if ImageGrab == None :
  			raise RuntimeError("Python Imaging Library (PIL) is not installed, but is required for GetScreenImage")
  		#
  		# Check for a valid FilePath and make sure the directories exist
  		#
  		filePath = FilePath
  		if filePath == '':
  			filePath = "Screenshots\\Screenshot - {0}.png".format(datetime.datetime.now().strftime('%Y-%m-%d__%H_%M_%S'))
  		
  		if filePath and os.path.isabs(filePath):
  			raise RuntimeError("Given FilePath='%s' must be relative to Robot outpudir" % filePath)
  		fullFilePath = os.path.join(BuiltIn().get_variable_value("${OUTPUT DIR}"), filePath) #image output file path is relative to robot framework output
  		if not os.path.exists(os.path.split(fullFilePath)[0]):
  			os.makedirs(os.path.split(fullFilePath)[0])
  		#
  		# Capture and save the screen image of the whole screen
  		#
  		GrabbedImage = ImageGrab.grab()     # store screenshot as "RGB" Image
  		GrabbedImage.save(fullFilePath)     # PIL evaluates extension
  		#
  		# Embed the screenshot in the Robot Framework log file
  		#
  		robot.api.logger.info('<td></td></tr><tr><td colspan="3"><a href="%s">'
  				   '<img src="%s" width="700px"></a></td></tr>' % (filePath, filePath), html=True)
code_tokens: def _takeScreenshot ( self , FilePath = '' ) : if ImageGrab == None : raise RuntimeError ( "Python Imaging Library (PIL) is not installed, but is required for GetScreenImage" ) filePath = FilePath if filePath == '' : filePath = "Screenshots\\Screenshot - {0}.png" . format ( datetime . datetime . now ( ) . strftime ( '%Y-%m-%d__%H_%M_%S' ) ) if filePath and os . path . isabs ( filePath ) : raise RuntimeError ( "Given FilePath='%s' must be relative to Robot outpudir" % filePath ) fullFilePath = os . path . join ( BuiltIn ( ) . get_variable_value ( "${OUTPUT DIR}" ) , filePath ) if not os . path . exists ( os . path . split ( fullFilePath ) [ 0 ] ) : os . makedirs ( os . path . split ( fullFilePath ) [ 0 ] ) GrabbedImage = ImageGrab . grab ( ) GrabbedImage . save ( fullFilePath ) robot . api . logger . info ( '<td></td></tr><tr><td colspan="3"><a href="%s">' '<img src="%s" width="700px"></a></td></tr>' % ( filePath , filePath ) , html = True )
short_docstring: Captures a full screen image, saves it into the specified file and logs in the Robot test log.
short_docstring_tokens: Captures a full screen image saves it into the specified file and logs in the Robot test log .
comment: """
  		Captures a full screen image, saves it into the specified file and logs in the Robot test log.		
  		_Parameters:_
  			- *FilePath* - optional, relative to the current Robot Framework Output Dir. If not specified, the default name is used.
  		"""$SEP$# Check that PIL is installed$SEP$#$SEP$# Check for a valid FilePath and make sure the directories exist$SEP$#$SEP$#image output file path is relative to robot framework output$SEP$#$SEP$# Capture and save the screen image of the whole screen$SEP$#$SEP$# store screenshot as "RGB" Image$SEP$# PIL evaluates extension$SEP$#$SEP$# Embed the screenshot in the Robot Framework log file$SEP$#