Upload screenshot
Command Description
Take a screenshot of the current screen and upload it to the Commander. It is recommended to use this command when an exception is caught during the process running or when the key steps of the process need to be recorded. This command will upload screenshots only when the process is run in the worker Attended - Floating License and unattended authorization modes
Command Prototype
Upload.UploadScreenShot(sFileName,sPath,bSave,optionArgs)
Command parameter
parameter | mandatory | type | default value | Instructions |
---|---|---|---|---|
sFileName | True | string | "image1" | The name displayed after the image file is uploaded to the Commander, which supports up to 100 characters. The image file name will automatically splice a time suffix, such as 1970-01-01 18-27-51.123456, to facilitate storage management and identification |
sPath | True | path | ''' C:\Users''' | The local path saved in the screenshot can be filled in with an absolute path or the path under the current process res folder can be represented in the form of @ res "path". The path separator needs to be escaped, such as "C: user" or @ res " laiye" |
bSave | True | boolean | True | Select 'Yes' to save the screenshot locally, select' No 'to not save the screenshot locally |
sDescribe | False | string | "" | The description of the current screenshot supports a maximum of 100 characters |
Run instance
/**************************Upload Screenshot**************************
Command prototype:
Upload.UploadScreenShot(sFileName, sPath, bSave, optionArgs)
Input parameters:
sFileName -- The name displayed after the image file is uploaded to UiBot Commander, supporting up to 100 characters. The image file name will be automatically appended with a time suffix, such as 1970-01-01 18-27-51.123456, for easy storage management and identification.
sPath -- The local path where the screenshot is saved. You can fill in an absolute path or use the @res "path" format to represent the path under the res folder of the current process. Path separators need to be escaped, such as "C:\\{{brand}}" or "@res{{brand}}\\{{brand}}".
bSave -- Choose "Yes" to save the screenshot locally, choose "No" to not save the screenshot locally.
sDescribe -- Description of the current screen screenshot, supporting up to 100 characters.
Output parameters:
--> None
Notes:
None
******************************************************************/
Upload.UploadScreenShot("image1", "D:\\", true, {"sDescribe": ""})