1. A method, in a data processing system comprising at least one processor and at least one memory, the at least one memory comprising instructions executed by the at least one processor to cause the at least one processor to implement a user interface automation tool, the method comprising: executing, by the user interface automation tool, a script to perform automation functions on user interface controls in a user interface of an application; responsive to automation of a given user interface control failing, identifying, by the user interface automation tool, a candidate user interface control that is the same as a user interface control expected in the script using a machine learning model; correcting, by the user interface automation tool, the script to refer to the candidate user interface control to form a corrected script; and performing, by the user interface automation tool, a user interface function on the candidate user interface control according the corrected script.