# US 2021/0342216 A1 · Screen response validation of robot execution for robotic process automation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0342216 A1
- Document ID: US20210342216A1
- Status: Published application
- Kind: A1
- Application number: 16/864,708
- Filed: 2020-05-01
- Published: 2021-11-04
- Earliest claimed: 2020-05-01
- Assignees: UiPath, Inc.
- Applicants: UiPath, Inc.
- Inventors: Daniel DINES
- Web page: https://patentgrep.com/patent/US20210342216A1

## CPC

- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 5/06: for changing the speed of data flow, i.e. speed regularising {or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor (G06F7/78 takes precedence)}
- G06F 9/451: Execution arrangements for user interfaces
- G06F 11/0706: {the processing taking place on a specific hardware platform or in a specific software environment}
- G06F 11/0772: {Means for error signaling, e.g. using interrupts, exception flags, dedicated error registers}
- G06F 11/3476: {Data logging (G06F11/14, G06F11/2205 take precedence)}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06V 10/457: {by analysing connectivity, e.g. edge linking, connected component analysis or slices}
- G06V 30/10: Character recognition
- G06V 30/153: {using recognition of characters or words}
- G06F 2201/865: Monitoring of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Screen response validation of robot execution for robotic process automation (RPA) is disclosed. Whether text, screen changes, images, and/or other expected visual actions occur in an application executing on a computing system that an RPA robot is interacting with may be recognized. Where the robot has been typing may be determined and the physical position on the screen based on the current resolution of where one or more characters, images, windows, etc. appeared may be provided. The physical position of these elements, or the lack thereof, may allow determination of which field(s) the robot is typing in and what the associated application is for the purpose of validation that the application and computing system are responding as intended. When the expected screen changes do not occur, the robot can stop and throw an exception, go back and attempt the intended interaction again, restart the workflow, or take another suitable action.

## Claims

### Claim 1

A computer program comprising screen response validation logic for robotic process automation (RPA) embodied on a non-transitory computer-readable medium, the program configured to cause at least one processor to:
determine whether a difference exists between a current screenshot frame and a previous screenshot frame, the current screenshot frame and the previous screenshot frame comprising an entire user interface or a portion thereof;
when the difference exists between the current screenshot frame and the previous screenshot frame and a difference between the current screenshot frame and the previous screenshot frame is expected based on an activity in a workflow of an RPA robot:
validate one or more changes between the current screenshot frame and the previous screenshot frame against one or more expected screen changes based on the activity of the workflow of the RPA robot, and
when the validation fails, throw an exception or initiate a remedial action.

### Claim 2 (depends on 1)

The computer program of claim 1, wherein when the current screenshot frame does not differ from the previous screenshot frame and no difference between the current screenshot frame and the previous screenshot frame is expected to occur based on the activity in the workflow of the RPA robot, the program is further configured to cause the at least one processor to:
fetch a next screenshot frame; and
repeat the process using the next screenshot frame as the current screenshot frame and using the current screenshot frame as the previous screenshot frame.

### Claim 3 (depends on 1)

The computer program of claim 1, wherein when the current screenshot frame does not differ from the previous screenshot frame and a difference between the current screenshot frame and the previous screenshot frame is expected to occur based on the activity in the workflow of the RPA robot, the program is further configured to cause the at least one processor to:
throw an exception or initiate a remedial action.

### Claim 4 (depends on 1)

The computer program of claim 1, wherein the remedial action comprises the RPA robot checking at the driver level whether a window for an application the robot is attempting to interact with is an active window, checking a location of a mouse pointer or caret relative to a graphical element in which a change was expected to occur, checking whether a correct graphical element is an active element, or any combination thereof.

### Claim 5 (depends on 1)

The computer program of claim 1, wherein the remedial action comprises the RPA robot setting a correct window as an active, focused window, setting a focus to an active element, moving a mouse and causing a mouse click event, or any combination thereof.

### Claim 6 (depends on 1)

The computer program of claim 1, wherein the throwing of the exception comprises stopping operation of the RPA robot, displaying a message on a screen, sending a message indicating that the RPA robot failed to achieve the one or more expected screen changes, listing one or more actions that failed, or a combination thereof.

### Claim 7 (depends on 1)

The computer program of claim 1, wherein the program is further configured to cause the at least one processor to:
generate a key character queue comprising key press events created by the RPA robot that occurred during a time window.

### Claim 8 (depends on 7)

The computer program of claim 7, wherein the RPA robot is configured to wait a time period between key press events.

### Claim 9 (depends on 7)

The computer program of claim 7, wherein when the difference between the current screenshot frame and the previous screenshot frame is expected to occur based on the activity in the workflow of the RPA robot and the expected screen changes based on the activity of the RPA robot workflow comprise one or more characters, the program is further configured to cause the at least one processor to:
perform optical character recognition (OCR) on the one or more locations where the current screenshot frame differs from the previous screenshot frame, wherein
the validation comprises matching characters recognized by the OCR to characters in the key character queue.

### Claim 10 (depends on 9)

The computer program of claim 9, wherein the program is further configured to cause the at least one processor to:
remove matching characters from the key character queue.

### Claim 11 (depends on 7)

The computer program of claim 7, wherein the key character queue is a first in—first out (FIFO) queue comprising a character of a key press event and a time that the key press event occurred for each of the key press events during the time window.

### Claim 12 (depends on 1)

The computer program of claim 1, wherein when the current screenshot frame differs from the previous screenshot frame and the difference between the current screenshot frame and the previous screenshot frame is expected to occur based on the activity in the workflow of the RPA robot, the program is further configured to cause the at least one processor to:
determine one or more regions where the current screenshot frame differs from the previous screenshot frame; and
extract one or more connected members in the one or more determined regions and perform optical character recognition (OCR) on the extracted one or more connected members, producing one or more recognized characters, one or more recognized character sequences, or both, and respective positions, wherein
the validation comprises comparing the one or more recognized characters, the one or more recognized character sequences, or both, to the key character queue or to one or more characters, one or more character sequences, or both, expected to appear based on the activity.

### Claim 13 (depends on 1)

The computer program of claim 1, wherein the program is further configured to cause the at least one processor to:
determine a target graphical element and content to be input into the target graphical element based on the activity in the workflow of the RPA robot;
validate whether the one or more changes between the current screenshot frame and the previous screenshot frame match a location of the target graphical element and whether the one or more changes match the content to be input into the target graphical element; and
when the location, the one or more changes, or both, do not match, throw the exception or initiate the remedial action.

### Claim 14 (depends on 1)

The computer program of claim 1, wherein the activity comprises entering text into a graphical element, moving a caret to the graphical element, pasting content into the graphical element, or a combination thereof.

### Claim 15 (depends on 1)

The computer program of claim 1, wherein the one or more expected screen changes based on the activity of the workflow of the RPA robot comprise submission of a form, opening of a new application window, or changing of a current application window.

### Claim 16

A computer program comprising screen response validation logic for robotic process automation (RPA) embodied on a non-transitory computer-readable medium, the program configured to cause at least one processor to:
determine a target graphical element and content to be input into the target graphical element based on an activity in a workflow of an RPA robot;
determine whether one or more differences exist between a current screenshot frame and a previous screenshot frame, the current screenshot frame and the previous screenshot frame comprising an entire user interface or a portion thereof; and
when the one or more differences do not exist between the current screenshot frame and the previous screenshot frame, throw an exception or initiate a remedial action.

### Claim 17 (depends on 16)

The computer program of claim 16, wherein when the one or more differences exist between the current screenshot frame and the previous screenshot frame, the program is further configured to cause the at least one processor to:
validate whether a change between the current screenshot frame and the previous screenshot frame matches a location of the target graphical element and whether the change matches the content to be input into the target graphical element; and
when the location, the change, or both do not match, throw an exception or initiate a remedial action.

### Claim 18 (depends on 16)

The computer program of claim 16, wherein the program is further configured to cause the at least one processor to:
apply a computer vision algorithm to determine graphical elements and associated bounding rectangles in the user interface, the determined graphical elements comprising the target graphical element.

### Claim 19 (depends on 16)

The computer program of claim 16, wherein the program is further configured to cause the at least one processor to:
generate a key character queue comprising key press events created by the RPA robot that occurred during a time window.

### Claim 20 (depends on 19)

The computer program of claim 19, wherein when the one or more differences exist between the current screenshot frame and the previous screenshot frame, the program is further configured to cause the at least one processor to:
perform optical character recognition (OCR) on the one or more locations where the current screenshot frame differs from the previous screenshot frame, wherein
the validation of whether the change between the current screenshot frame and the previous screenshot frame matches the content to be input into the target graphical element comprises matching characters recognized by the OCR to characters in the key character queue.

### Claim 21 (depends on 16)

The computer program of claim 16, wherein the activity comprises entering text into a graphical element, moving a caret to the graphical element, pasting content into the graphical element, or a combination thereof.

### Claim 22 (depends on 16)

The computer program of claim 16, wherein the one or more expected screen changes based on the activity of the workflow of the RPA robot comprise submission of a form, opening of a new application window, or changing of a current application window.

### Claim 23

A computer-implemented method for performing screen response validation for robotic process automation (RPA), comprising:
determining, by an RPA robot, whether a difference exists between a current screenshot frame and a previous screenshot frame, the current screenshot frame and the previous screenshot frame comprising an entire user interface or a portion thereof; and
when the current screenshot frame does not differ from the previous screenshot frame and a difference between the current screenshot frame and the previous screenshot frame is expected to occur based on the activity in the workflow of the RPA robot, throwing an exception or initiating a remedial action, by the RPA robot.

### Claim 24 (depends on 23)

The computer-implemented method of claim 23, wherein when the difference exists between the current screenshot frame and the previous screenshot frame and a difference between the current screenshot frame and the previous screenshot frame is expected based on an activity in a workflow of an RPA robot, the method further comprises:
validating, by the RPA robot, one or more changes between the current screenshot frame and the previous screenshot frame against one or more expected screen changes based on the activity of the workflow of the RPA robot; and
when the validation fails, throwing an exception or initiating a remedial action, by the RPA robot.
