Version:
classimplements ElementInspectionProviderInterface
ElementInspector
Provides element inspection capabilities for desktop windows.
Implements the ElementInspectionProviderInterface from @nut-tree/provider-interfaces.
typescript
class ElementInspector implements ElementInspectionProviderInterfaceMethods
findElement
findElement(windowHandle: number, description: WindowElementDescription): Promise<WindowElement>Tries to find a single element matching the given description, throws an error if none was found.
Parameters
windowHandlenumberThe window handle of the window to search inReturns
Promise<WindowElement>findElements
findElements(windowHandle: number, description: WindowElementDescription): Promise<WindowElement[]>Tries to find all elements matching the given description, returns an empty array if none was found.
Parameters
windowHandlenumberThe window handle of the window to search inReturns
Promise<WindowElement[]>getElements
getElements(windowHandle: number, maxElements?: number): Promise<WindowElement>Gets all elements in a window up to a maximum count.
Parameters
windowHandlenumberNative window handle of the window to inspectmaxElements?numberMaximum number of elements to returnReturns
Promise<WindowElement>Was this page helpful?