Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NativeAdapter

NativeAdapter serves as an abstraction layer for all OS level interactions.

This allows to provide a high level interface for native actions, without having to spread (possibly) multiple dependencies all over the code. All actions which involve the OS are bundled in this adapter.

Hierarchy

  • NativeAdapter

Index

Constructors

constructor

Methods

click

  • click(...keys: Key[]): Promise<void>

copy

  • copy(text: string): Promise<void>

currentMousePosition

  • currentMousePosition(): Promise<Point>

getActiveWindow

  • getActiveWindow(): Promise<number>

getWindowRegion

  • getWindowRegion(windowHandle: number): Promise<Region>

getWindowTitle

  • getWindowTitle(windowHandle: number): Promise<string>
  • getWindowTitle returns the title of a window addressed via its window handle

    Parameters

    • windowHandle: number

    Returns Promise<string>

    A string representing the title of a window addressed via its window handle

getWindows

  • getWindows(): Promise<number[]>

leftClick

  • leftClick(): Promise<void>

middleClick

  • middleClick(): Promise<void>

paste

  • paste(): Promise<string>

pressButton

  • pressButton(btn: Button): Promise<void>

pressKey

  • pressKey(...keys: Key[]): Promise<void>

releaseButton

  • releaseButton(btn: Button): Promise<void>

releaseKey

  • releaseKey(...keys: Key[]): Promise<void>

rightClick

  • rightClick(): Promise<void>

scrollDown

  • scrollDown(amount: number): Promise<void>

scrollLeft

  • scrollLeft(amount: number): Promise<void>

scrollRight

  • scrollRight(amount: number): Promise<void>

scrollUp

  • scrollUp(amount: number): Promise<void>

setKeyboardDelay

  • setKeyboardDelay(delay: number): void

setMouseDelay

  • setMouseDelay(delay: number): void

setMousePosition

  • setMousePosition(p: Point): Promise<void>

type

  • type(input: string): Promise<void>