-
Notifications
You must be signed in to change notification settings - Fork 0
SendKey.cs
Avrigeanu Laurian edited this page Apr 11, 2023
·
1 revision
Sends a key press to a page.
-
key
: AKey
enum value representing the key to press. -
page
: AnIPage
object representing the page to send the key press to. -
activatePage
: Abool
value indicating whether to activate the page before sending the key press. Default isfalse
.
None.
This method sends a key press to the provided IPage
object by calling its Keyboard.PressAsync
method with the string representation of the provided key
enum value. If the activatePage
parameter is set to true
, the method also calls the BringToFrontAsync
method of the provided IPage
object to activate the page before sending the key press. The method blocks until the key press has been successfully executed before returning. The Log
class is used to write an information message to the log indicating that the key has been pressed.