Home > Running a Script > Handling Errors & Logging > Handling Incorrect Typing

Handling Incorrect Typing

SendKeys function simulates keyboard input into Windows objects. 
WriteHTML simulates keyboard input into HTML objects.

If WinTask is unable to simulate some of the key presses defined by the specified string, an error message is reported (unless #IgnoreErrors=1). In a Web page, you can replace WriteHTML by WriteHTMLPaste which pastes as is the specified text.
Special characters (such as <, ", F10, etc.) cannot be typed directly using SendKeys, you need to use their keyboard mnemonic (list of Keyboard Mnemonics).

Another possible incorrect typing can happen when a WriteHTML function is executed: you see that nothing is typed or just the last characters. This happens if the field position is not totally freezed whereas the page is fully loaded. To force a synchronization for this HTML element, use the system variable #HTMLPosRetry. If this variable is at a value different from 0 (0 is its default value), the position of the HTML element is checked once or several times before writing in it.

See also

Error Handling Overview
Handling Unexpected Windows
Handling Object not found Error
Handling Page Timeout Error
Handling Inacurrate ClickHTMLElement
Handling Pause Error
Logging Execution