Mouse and keyboard emulation

What is emulation used for

  • It is necessary to send mouse clicks to the specified coordinates on the web page;

  • You need to emulate keystrokes, for example, "Escape" or "Enter" on a web page;

  • Many websites have introduced protection against bots by monitoring whether keys are pressed when filling in input fields. Mouse and keyboard emulation will help bypass this protection.

Where and how is it used

To emulate a mouse click, you need to specify the coordinates within which the click will occur, and choose which mouse button to click. You can also select the type of distribution: normal - more likely to be closer to the center, or uniform - even distribution within the specified coordinates.

To emulate text input from the keyboard, you will need to enter the text itself, and specify the delay time between pressing. To emulate pressing of special keys, press Ctrl + Space on the text input field, in the list that opens, select the required button.

When filling in fields and clicking on buttons and links, emulation is enabled by default. In the project settings, you can centrally change the emulation level for all actions that fill in the fields on the web page and click on buttons and links. Each action has its own emulation setting, which can overwhelm the centralized setting.

In the keyboard emulation action, you can use plain text, project variables, and special keys ({TAB}, {ENTER}, {BACKSPACE}, {CTRL}, and others. For a complete list of available keys, press CTRL + SPACEBAR in the text input field):

Also see screenshot search .

C# virtual mouse movement methods: