Question

Rakuten Card Co., Ltd.
JP
Last activity: 1 Dec 2022 1:15 EST
GetValue and SendKeys processes do not work stably.
We have created a robot that repeatedly performs screen operations, screen transitions, screen information acquisition, and input to a web application running on Edge. This robot does all processing automatically, without human intervention.
We confirmed that the logic passed through to the end by step execution in debug mode, but when we actually tried to run the robot, errors occurred occasionally in the acquisition of screen information (GetValue) and key input (SendKeys).
It is not that errors occur 10 out of 10 times when executing under the same conditions, but sometimes errors occur 5 or 6 times. I try to wait for the next screen to be created by WaitForCreate and make sure the screen information is displayed before GetValue is executed, but the error still occurs. It seems that the error rate is particularly high when the terminal is under load.
Are there any effective measures to improve the above? Also, I am considering the following measures.
I am considering the following measures, but I am not sure if they are correct.
・Set up TryCatch and add logic to redo processing in the event of an Exception. ・Sleep for about 3 seconds before processes that frequently generate errors.
I would like to hear if there is a more effective countermeasure. Thank you in advance.