The purpose of this sample scenario is to take a screen capture as a log when an error is detected during processing and save it with a unique file name. The outline of the process is as follows.
In this sample scenario, the following WinActor(OR-5200) modules are used.
The operation of this sample scenario works in the following environment.
The usage of this sample scenario is as follows.
Extract the downloaded ZIP file and load this sample scenario included in the extracted folder with WinActor.
Set the values required to execute this sample scenario in the variable list. The following two variables need to be set in advance.
Variables that need to be set in advance
Example) C: \ winactor \ test1.html
Example) C: \ winactor \ output
In this sample scenario, there are variables to change the behavior. There is no problem if you execute with the default values, but if you want to change the screen capture file name output when an error occurs, change the values of the following variables.
Example) Error occurrence screen_
Start executing this sample scenario with WinActor. The link click fails on the error page, the desktop screen capture is saved, and this sample scenario ends.
Make sure that the desktop screen capture is saved in the folder specified in the destination folder. Also, make sure that the screen capture has a file name that includes "year, month, day, hour, minute, second".
In this sample scenario, an error message will be displayed if a variable is specified incorrectly.
See the error message list for more information.
This section describes the implementation techniques used in this sample scenario.
"PL1912_442_GetDate_yyyymmddhhmmss_script.ums6" can store the current year / month / day / hour / minute / second in a variable. In this sample scenario, the screen capture is saved with the file name of the error occurrence time.
Screen capture output subroutine
By specifying "Error occurrence screen_" as the prefix of this library and ".png" as the suffix, it is stored in a variable as the file name including the file title and extension.
Property settings of PL1912_442_GetDate_yyyymmddhhmmss_script.ums6
As mentioned above, by specifying "Error occurrence screen_" as the prefix of the library and ".png" as the suffix, the file name including the file title and extension is saved as a unique file name.
Also, if you do not specify the prefix and suffix in "Get year / month / day / hour / minute / second (yyyymmddhhmmss)", only the year / month / day / hour / minute / second can be stored in the variable, so you can create a unique folder name.
By using the exception handling and subroutines of this sample scenario for a scenario used in your work, it is possible to save trail in the event of an error. For example, you can take a screen capture during operation when image matching fails or an error occurs in Excel operation. Trails such as screen captures can be used for investigating the cause of errors and sharing execution results.
This sample scenario can be executed without any error for checking the operation. By changing the file name of the attached "test2_dummy.html" to "test2.html", the operation will be as follows.
Nodes executed during normal operation