UiPath can't find selector after 1 hour (before that time it was normal operation)

Hi @tutu2 ,

I guess it is due to below things

1. Possible Version Changes

  • While you’re using UiPath Studio 2022.4.9, there might have been updates to related packages (e.g., UiPath.Core.Activities or browser-related extensions). Check the following:
    • Open Manage Packages in UiPath Studio.
    • Verify if there are updates available for activities like UiPath.Core.Activities.
    • Confirm that the browser extension for Microsoft Edge is up to date. Browser updates can sometimes cause changes in selectors.

2. Selector Dynamics

  • A SelectorNotFoundException often indicates that the UI element cannot be identified. Since this occurs after an hour, it may be due to dynamic changes in the browser window. Try the following:
    • Refine the Selector: Use wildcard characters (*) or variables to make the selector more adaptable. For example:
      <title>*xlsx*</title>
      
    • Validate the Selector: Open the UI Explorer in UiPath and validate the selector during runtime to ensure it’s still identifying the element.
    • Delay Before Checking: Introduce a slight delay before the UiElementExists check to allow the browser to stabilize.

3. Edge Browser Behavior

  • Browser caching, memory usage, or a session timeout could impact your workflow. To mitigate:
    • Use the Close Tab activity after each iteration to free up system resources.
    • Clear the browser cache periodically during runtime, if possible.

4. Exception Timing Pattern

  • The consistent timing (around 1 hour and 3 minutes) suggests a possible session timeout or memory/resource exhaustion. To address this:
    • Use the Kill Process activity to terminate msedge.exe at intervals, then relaunch it before continuing.
    • Monitor system resources (RAM, CPU) during execution to check if the robot process or browser is consuming excessive resources.

5. Logs and Debugging

  • Enable verbose logging in UiPath to capture detailed information about what occurs just before the exception.
  • Analyze the logs for patterns, such as memory leaks, failed attempts to find elements, or application crashes.

1 Like