Automating Delphi Applications with UiPath: Top Tips

Posted by Comms Team

Here are some “Top Tips” for using UiPath to automate processes on Delphi based legacy applications.

UiPath is a great tool for automating workflows on legacy applications.  But sometimes, legacy applications are built using languages which pose problems – such as Delphi.  VKY recently delivered a number of projects for a Financial Services client whose core legacy application was built on Delphi, so we developed first hand experience of the challenges and how to handle them.  Below, Automation Engineer, Allan Hendry provides his top tips for using UiPath with Delphi.

Allan’s Top Tips for Using UiPath with Delphi

UiPath uses Windows and the UI handles it exposes to interact with applications.  Generally, any applications written in .Net and Java maintain their window names and UiPath can build routines using these.  Applications written in Delphi are not so reliable with their naming conventions.  That is a feature of how Delphi compiles, and nothing to do with the actual code written by the Delphi developer. 

In UiPath there are strategies which can be used to mitigate this problem.  

  • Where there is an idx attribute in the selector try and remove it.  Refine your selector to avoid it and base it upon fields which will not change like a text field
  • Use anchors. Often you will be able to find something which you can select for, and then base your search for the field you want on that anchor
  • Send key presses.  Rather than finding a button element and clicking it, try sending text<<arrow>> keys and <<enter>> can complete forms without having to identify exactly named fields
  • Use Image recognition techniques. Image recognition can come to the rescue for identifying screen properties when other methods fail.  Just make sure your development systems screen scaling matches that in the production environment
  • Take care with the timing of activities. When activities are fired, wait for their results, whether to “Complete” or to become Interactive.  If we do not wait for the results, the next activity can fire before the application is ready.  This can give the appearance of activities firing out of the expected order, resulting in text being sent to the wrong windows, and general erratic behaviour which can be very confusing to debug

Using these techniques can mitigate the problems which occur automating legacy Delphi applications and in other awkward applications in general. 

Using these techniques can mitigate the problems which occur when automation legacy Delphi applications.  The same techniques can be used with other “awkward” applications too.

To find out more about our experiences with Delphi and other legacy applications, please contact us