playwright/src/injected/selectorEngine.ts

13 lines
455 B
TypeScript
Raw Normal View History

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export type SelectorType = 'default' | 'notext';
export type SelectorRoot = Element | ShadowRoot | Document;
export interface SelectorEngine {
name: string;
create(root: SelectorRoot, target: Element, type?: SelectorType): string | undefined;
query(root: SelectorRoot, selector: string): Element | undefined;
queryAll(root: SelectorRoot, selector: string): Element[];
}