The Problem: My RPA workflow reads an Excel, looks up our company’s Salesforce Page and hits the Delete button. Once, the robot clicks on the Delete button, a Browser Dialog pops up asking for a confirmation on the Delete. At this point, the workflow fails and the Robot stops the workflow complaining that it couldn’t find the Delete (tag=‘INPUT’) button.
From my observations, the robot is most likely losing the bearing on the Delete button, because the active focus is stolen by the large Blue OK button as soon as the Delete button is clicked! The result is no different, regardless of which Delete button is clicked.
I tried all the fixes described in the older forum thread mentioned in my opening post, but none of them worked in the Evaluation version 2019.4.4 of UiPath.
The Simple Workaround:
- I moved the Click event into a Try-Catch container.
- In the Catch section, I put in a Delay event deliberately to help in the debugging process.
- Lastly, in the Finally section, I added a Send Hot Key action to send an (enter) key press to the screen.
The following events occur with this workaround:
- The Robot clicks on the Delete button as usual
- But this time, the error is trapped by the catch container
- The Delay activity in the catch container pauses the workflow for a couple of seconds
- By this time, the Browser dialog box has popped up and the Blue OK button has got focus
- The Finally section sends an (enter) hot key click to the window
- Because the Blue OK button has focus, it’s clicked by the Hotkey action and the Delete operation succeeds!
The images below show the Workflow fixes, and the before and after scenarios of the Delete operation.
I’ve tested this at least a couple of times on our Salesforce Page. It’s a bit slow, as the Robot slows down once it encounters the error in the Try block, and then figures out that it must send the hotkey event. The delay is further compounded by the optional 2 second delay added for debugging, which can be removed. But the results are reliable.
Give it a shot! Hope this helps!