Best practice for handling unstable/slow websites?

Hi there

What kind of methods do you use, when working with unstable/slow websites, to make sure as many queue elements as possible ends up as a success while generally maintaining fast processing time?

Common problems includes a page being stuck on loading screen, data in a table sometimes showing up right away and sometimes randomly loading for 30 seconds or more.

Another problem could be search/filters sometimes not returning the expected result.

1 Like

Hi @fredslund7889 ,
With activity, you can use retry can be 3 times
Check elements exit before click, or type into,…
Delay, wait page load,…
With download file, you can check file exit

regards,

Hi @fredslund7889

For unstable and slow website.
→ You can use the Retry activity
→ Use the Try catch activity
→ Use the delays and check app state activity.

Hope it helps!!

Hi

There are many workaround

  1. Check whether that web application has a API version to access the data
    API calls are very stable, reliable and faster when compared to interacting with it through Ui

  2. If there is no option for api then try to handle those wait time with below set of activities

  • Check app state
  • on element appear
  1. If u want to skip the error and continue further you can surround the activity within a TRY CATCH a activity or being a UI activity u can enable Continue on error property in that activity so that it continues further even if it fails

Hope this helps

Cheers @fredslund7889

Delay activity isn’t a good approach because it will always delay for that amount of time, even if the web page is ready.

It’s better to use Check App State and set a longer timeout. That way as soon as the web page is ready, processing will continue.

1 Like

@fredslund7889

  1. For longer load check app state with longer timeout would help
  2. For not loding…better to try if it has api’s…if not then for each transition its better to use check app state with parallel activity to check both for negative and positive case so that even when not found it would move faster to failed instead of waiting for full time
  3. Even for search not returning as expected instead of using check apps tate for only positive scenario use two ,one for positive and one for negative …and have them in parallle so that both execute at one and would not wait for max tiemout

Cheers

Hope it’s clarified
Let us know if u r facing any challenges @fredslund7889

Hi @fredslund7889

When working with unstable or slow websites using UiPath or similar RPA (Robotic Process Automation) tools, you can apply various techniques to maximize the success rate of processing queue elements while maintaining efficiency. Here are some specific methods and best practices:

    • Implement a retry mechanism within your UiPath workflow. If a web page or API request fails, schedule it for a retry with an incremental delay. Gradually increase the delay between retries to avoid overloading the website.
    • Set reasonable timeouts for activities that interact with the website. Use the “Timeout” property in UiPath activities to prevent waiting indefinitely for slow responses. If an activity exceeds the timeout, handle it as a failure.
    • Utilize parallel processing techniques in UiPath to handle multiple queue elements concurrently. This can significantly improve processing time, especially when dealing with slow websites.
  1. Before interacting with elements on a web page, use the “Element Exists” activity in UiPath to check if the required elements have loaded. This prevents interacting with elements that are not yet available.
  2. Implement dynamic waits using the “Wait Element Vanish” or “Wait Image Vanish” activities in UiPath to handle situations where a loading screen is present. These activities wait until a specific element or image disappears before proceeding.
  3. When dealing with data tables that load slowly or intermittently, use activities like “Data Scraping” or “Get Text” with dynamic waits to retrieve data. Ensure that your workflow can handle cases where the table loads gradually.
  4. Develop comprehensive error handling within your UiPath workflow to gracefully manage different types of errors, such as application crashes, network issues, or unexpected behavior on the website.
  5. When performing searches or using filters on a website, validate the results to ensure they match the expected outcome. Implement conditional checks to handle cases where the expected results are not returned.
  6. Implement detailed logging and debugging features in your UiPath workflow to capture information about each step of the automation process. This helps in identifying issues and diagnosing failures.
  7. Include logic to refresh the page or navigate to a specific URL if the website becomes unresponsive or stalls during automation. UiPath provides activities for page navigation and refreshing.
  8. Monitor the resource utilization of your automation environment. Ensure that your UiPath robot has sufficient computing resources to handle the automation tasks effectively.
  9. Regularly test and validate your automation workflows on the target website. This includes checking for changes

Thanks!

1 Like

Very nice detailed answer - i am marking this as the solution :slight_smile:. Thank you for your contribution.

1 Like

Be aware of using parallel activities. This only works if there is no javascript on a site that reacts on inputs. You kinda screw that up and get false positives and negatives from using parallel.

A few comments/questions.

“4. Before interacting with elements on a web page, use the “Element Exists” activity in UiPath to check if the required elements have loaded. This prevents interacting with elements that are not yet available.”

Is there some specific cases where it would make more sense than others to use this as a control? Say you have a process where you have to interact with 7-8 elements that has to be activated somehow (by clicking on a menu item, opening a pane, clicking on an item on a list etc.). I’m thinking i wouldn’t want 8 Element Exists activities in this case?

Do you use it sparingly on elements that tend to cause problems? Or perhaps within a parallel activity to search for multiple elements at once, when different messages can show up after a search for example? (“Invoice not found”, “Invalid invoice number”, “Invoice 54632 found!” etc.)

Hi @fredslund7889

Using the “Element Exists” activity in UiPath is a good practice for ensuring that required elements have loaded before interacting with them. However, you are correct that in some scenarios, using it excessively might not be the most efficient approach. Here are some considerations:

  1. Multiple Elements: If you have a process that involves interacting with multiple elements that need to be activated (e.g., clicking on menu items, opening panes, selecting items from a list), you might not want to use an “Element Exists” activity for each one. Instead, you can use it strategically for critical elements or elements that tend to cause issues, while assuming that some elements will be present if you have reached a particular step in your workflow.

  2. Parallel Activity: Using the “Element Exists” activity within a Parallel activity can be a good approach when you are searching for multiple elements with different messages or conditions. This allows you to simultaneously check for the existence of various elements and proceed based on the outcomes.

  3. Wait Activities: In many cases, you can use “Wait” activities (e.g., “Wait Element Vanish” or “Wait Element Appear”) to control the flow of your automation. These activities can help you wait for an element to appear or disappear before proceeding, without explicitly using “Element Exists” activities.

  4. Exception Handling: Consider using Try-Catch blocks to handle exceptions when interacting with elements. If an element is not found or an interaction fails, you can catch the exception and handle it accordingly, which can reduce the need for many “Element Exists” activities.

  5. Efficiency vs. Robustness: The decision to use “Element Exists” should balance between efficiency and robustness. For critical elements that are prone to change or are unreliable, it makes sense to use it. For elements that are consistently available and reliable, you might use it sparingly.

In summary, while “Element Exists” is a valuable tool for ensuring element availability, it should be used judiciously based on the specific needs of your automation process. Consider the criticality of the elements, the reliability of your application, and the overall efficiency of your workflow when deciding where to use it.

Thanks!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.