Classic UIAutomation Activities: UiPath.Core.ElementOperationException: Timeout reached. ---> System.Runtime.InteropServices.COMException: Timeout reached.
The error "Timeout reached" occurs when the robot is waiting for some UI elements to appear on screen and the element is not available even after the 30sec (default timeout). In certain cases the element may be visible in the UI, however the background code of the element is not fully loaded inside of the application used (hence it is not considered "ready") or some other window is "greedy" with focus (example: UAC pop-ups)
The following instructions may assist you in addressing the various causes:
- Increase the timeout amount in the field "Timeout" to allow the element to load
- Use the activity "Element Exists" before performing the specific action on the element (like Click) so that you get to know whether the robot is able to detect the element or not
- If some activity is used that has the property of "WaitForReady", then try with the setting of "NONE" / "COMPLETE"
- Use the "Retry" activity to retry the automation in case it fails
- Try using "SendWindowMessages"/ "SimulateClick" options depending on the type of application you are interacting with
- Some elements need to be on screen to be considered active in certain applications. Resolution changes between development machines and unattended robot machines may cause the responsive window to not display the element. The Resolution settings of the Robot set in Orchestrator under Robot Settings need to match the ones on the machine where the workflow developed
- Use the activity "Take Screenshot" + "Save Image" to capture the image of the screen when it occurs to assist in troubleshooting or use remote debugging. In this way, it is possible to visualize what the state of the screen was when the failure occurred i.e in case there were any system Pop-Ups which were not expected etc.