What is the difference between SimulateClick and SendWindowMessage?

Hi All

I am new in UiPath. I want to know what is the difference between SimulateClick and SendWindowMessage ? What is the usage of these properties ?

When should we use these properties ?

1 Like

Hey, @kkpatel

  • SendWindowMessages - If selected, the click is executed by sending a specific message to the target application. This input method can work in the background, is compatible with most desktop apps, but it is not the fastest of the methods. By default, this check box is not selected. If neither this nor the SimulateClick check boxes are selected, the default method simulates the click by using the hardware driver. The default method is the slowest, it cannot work in the background, but it is compatible with all desktop apps.

  • SimulateClick - If selected, it simulates the click by using the technology of the target application. This input method is the fastest of the three and works in the background. By default, this check box is not selected. If neither this nor the SendWindowMessages check boxes are selected, the default method performs the click using the hardware driver. The default method is the slowest, it cannot work in the background, but it is compatible with all desktop apps. If you select this property, it is recommended to check the state of the target UI element prior to execution

I have gone through these definitions. I want some practical scenarios.

As far as practical examples go, my experience is that SimulateClick will click on the element if possible, and requires less information about the screen state to successfully click. However, sending window messages can be more reliable depending on the application. Best to test which works best in your scenario, though SimulateClick is preferred where possible to use.

Also, alternatively you can use neither, which will use the hardware to click on the element, and you’ll see the cursor move to the item on which to click. If you do not have a means to communicate with the software through SimulateClick or SendWindowMessages, this can be used, but is slower. Also, it’s difficult to test your process on your local machine, since the robot takes control of your cursor, giving you less freedom while it runs.