A method for automatic revision of an automation script, the method comprising: obtaining (32, 34) a sequence of recorded actions (A-G) that produces a result and an automation script, the automation script including a sub-sequence of the sequence, wherein an action is included in the automation script in accordance with a classification of that action, wherein the classification comprises classifying an action as either relevant or irrelevant to attaining sail result, wherein an action is initially classified as relevant when entailing a change of a user interface screen or involving selection of a screen control and an action is initially classified as irrelevant when involving only cursor movement, including that action in the automation script if that action is classified as relevant, and omitting that action from the automation script if that action is classified as irrelevant; executing the automation script; upon failure of an action of the automation script to execute, reclassifying an action of the sequence omitted from the automation script, wherein the reclassifying of the action comprises iteratively performing: reclassifying a selected action of the sequence as relevant; attempting to execute the selected action; and if the attempted execution fails, selecting another action of the sequence omitted from the automation script to be the selected action and repeating the above steps; verifying that the action that failed to execute executes successfully after the reclassifying; in case the action that failed to execute does not execute successfully after the reclassifying, repeating the step of reclassifying; and in case the action that failed to execute executes successfully after the reclassifying, revising the automation script by including the reclassified action into the automation script. obtaining (32, 34) a sequence of recorded actions (A-G) that produces a result and an automation script, the automation script including a sub-sequence of the sequence, wherein an action is included in the automation script in accordance with a classification of that action, wherein the classification comprises classifying an action as either relevant or irrelevant to attaining sail result, wherein an action is initially classified as relevant when entailing a change of a user interface screen or involving selection of a screen control and an action is initially classified as irrelevant when involving only cursor movement, including that action in the automation script if that action is classified as relevant, and omitting that action from the automation script if that action is classified as irrelevant; executing the automation script; upon failure of an action of the automation script to execute, reclassifying an action of the sequence omitted from the automation script, wherein the reclassifying of the action comprises iteratively performing: reclassifying a selected action of the sequence as relevant; attempting to execute the selected action; and if the attempted execution fails, selecting another action of the sequence omitted from the automation script to be the selected action and repeating the above steps; reclassifying a selected action of the sequence as relevant; attempting to execute the selected action; and if the attempted execution fails, selecting another action of the sequence omitted from the automation script to be the selected action and repeating the above steps; verifying that the action that failed to execute executes successfully after the reclassifying; in case the action that failed to execute does not execute successfully after the reclassifying, repeating the step of reclassifying; and in case the action that failed to execute executes successfully after the reclassifying, revising the automation script by including the reclassified action into the automation script.