UNPKG

umbrellamode

Version:

UmbrellaMode shared library

26 lines (25 loc) 853 B
export {}; /** * Actor class for performing DOM interactions and browser automation * * The Actor provides a comprehensive set of methods for interacting with web pages, * including clicking, typing, scrolling, and element manipulation. All methods use * native DOM APIs and properly handle React components by bypassing synthetic events. * * @example * ```typescript * const actor = new Actor(); * * // Basic interactions * await actor.click({ selector: '#submit-button' }); * await actor.type({ selector: '#username', text: 'john.doe', simulateTyping: false }); * * // Scrolling * await actor.scrollToElement({ selector: '#section-3' }); * await actor.scrollBy({ x: 0, y: 200 }); * * // Element state * const isVisible = actor.isElementInViewport({ selector: '#hero' }); * const position = actor.getScrollPosition({}); * ``` */