import { By } from './by'; /** * This type is used as a return type of Element.getRect method * Represents coordinates and size of the element */ export interface ElementRectangle { x: number; y: number; width: number; height: number; } export interface Element { findElement(locator: By): Promise; findElements(locator: By): Promise; containsElement(locator: By): Promise; containsElements(locator: By): Promise; getText(): Promise; getCssValue(cssStyleProperty: string): Promise; getAttribute(attributeName: string): Promise; getValue(): Promise; isDisplayed(): Promise; isEnabled(): Promise; isExisting(): Promise; /** * if invoked on the element without shadowRoot, check if current element is active inside driver * otherwise check if current element is same as shadowHost.shadowRoot.activeElement * @see https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/activeElement * @return true if current element is active */ hasFocus(): Promise; /** * click on the element */ click(): Promise; /** * double click */ doubleClick(): Promise; /** * right click */ rightClick(): Promise; /** * click on the element and hold (do not release mouse button) * @param durationSec hold duration in seconds */ clickAndHold(durationSec?: number): Promise; /** * Clear a