Interface · Testing
DesktopTestDriver
Headless driver for locating and interacting with controls by their key.
@sharpts/gui 0.0.0-local · SharpTS 7c6010104a43Members
afterRender
afterRender(callback: () => void): voidRuns a callback after pending async event, reactive render, and native commit work completes.
cancelPointer
cancelPointer(key: string): voidCancels an active captured primary mouse pointer on its keyed control.
click
click(key: string): voidActivates the keyed control.
dragPointer
dragPointer(key: string, points: readonly { x: number; y: number }[]): voidDrags the primary mouse pointer through local x/y coordinate pairs on a keyed control.
dropText
dropText(key: string, value: string): stringSimulates dropping text on a keyed control.
getProperty
getProperty(key: string, property: DesktopTestProperty): stringReads a supported native property from the keyed control.
getText
getText(key: string): stringReads the keyed control's text content.
movePointer
movePointer(key: string, point: { x: number; y: number }): voidMoves an active primary mouse pointer to local coordinates on its keyed control.
pressKey
pressKey(key: string): voidSends a normalized key press to the keyed control.
pressPointer
pressPointer(key: string, point: { x: number; y: number }): voidPresses the primary mouse pointer at local coordinates on a keyed control.
queueFolderDialogResult
queueFolderDialogResult(path: string | null): voidQueues a local path, or null cancellation, for the next native folder dialog.
queueMessageDialogResult
queueMessageDialogResult(result: "ok" | "cancel" | "yes" | "no"): voidQueues the result consumed by the next native message dialog.
queueOpenFileDialogResult
queueOpenFileDialogResult(paths: readonly string[]): voidQueues local paths returned by the next native open-file dialog.
queueSaveFileDialogResult
queueSaveFileDialogResult(path: string | null): voidQueues a local path, or null cancellation, for the next native save-file dialog.
releasePointer
releasePointer(key: string, point: { x: number; y: number }): voidReleases an active primary mouse pointer at local coordinates on its keyed control.
setCheckBoxValue
setCheckBoxValue(key: string, value: boolean): voidReplaces the checked state of a keyed CheckBox.
setComboBoxIndex
setComboBoxIndex(key: string, value: number): voidSelects an item in a keyed ComboBox.
setSliderValue
setSliderValue(key: string, value: number): voidReplaces the numeric value of a keyed Slider.
setTextBoxValue
setTextBoxValue(key: string, value: string): voidReplaces the value of a keyed TextBox.
setWindowClientSize
setWindowClientSize(width: number, height: number): voidReplaces the headless window client size in device-independent pixels.
Related symbols
Source
SharpTS.Gui.Sdk/GuiPackage/testing.ts:9 at SharpTS revision 7c6010104a43c34d80e9d44704cf179bc4f5b8e0.