Mouse and Keyboard Emulation
🔗 Original page — Source of this material
What is emulation used for
- You need to send mouse clicks to specified coordinates on a web page;
- You need to emulate key presses, for example, “Escape” or “Enter” on a web page;
- Many websites have implemented bot protection, tracking whether keyboard keys are pressed when filling in input fields. Mouse and keyboard emulation can help bypass this protection.
Where and how it is used
For ❗→ mouse click emulation you need to specify the coordinates where the click will happen, and choose which mouse button to click with. You can also choose the type of distribution: “normal” (where the click will tend to hit closer to the center) or “uniform” (evenly distributed within the specified coordinates).
For ❗→ keyboard text input emulation you’ll need to enter the text itself and set the delay between key presses. To emulate special key presses, press Ctrl+Space in the text input field and select the desired key from the list that appears.
When filling in fields and clicking 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 fields on a web page and click buttons or links. Each action ❗→ has its own emulation setting which can override the centralized setting.
In the keyboard emulation action, you can use plain text, project variables, and special keys ({TAB}, {ENTER}, {BACKSPACE}**, {CTRL} and others. To get the full list of available keys, press CTRL+SPACE in the text input field):

See also ❗→ screenshot search.
C# methods for moving the virtual mouse:
- FullEmulationMouseMoveToHtmlElement - move the virtual mouse to an element from its current virtual position;
- FullEmulationMouseMove - move the virtual mouse to coordinates from its current virtual position;
- FullEmulationMouseClick - click the mouse at the current position of the virtual mouse;
- FullEmulationMouseMoveAboveHtmlElement - emulates reading an element;
- Property FullEmulationMouseCurrentPosition - returns the current position of the virtual mouse.
- Method FullEmulationMouseSetOptions - sets mouse emulation parameters. This method should be called after each call to the Navigate method and is available starting from version 5.10.4.1.