import { ElementCore } from './element-core'; import { ClickOptions, TypeOptions, FlashOptions, ScrollOptions } from './types'; /** * ElementActions - 操作方法 mixin * * 包含:click、type、clear、fill、focus、flash、hover、dragTo、scroll */ export declare function ElementActions ElementCore>(Base: T): { new (...args: any[]): { /** * 点击元素 */ click(options?: ClickOptions, ...propNames: string[]): Promise; /** * 双击元素 */ dblclick(): Promise; /** * 右键点击元素 */ rightClick(...propNames: string[]): Promise; /** * 在元素中输入文本 */ type(text: string, options?: TypeOptions): Promise; /** * 清空元素内容 */ clear(): Promise; /** * 填充元素内容 */ fill(text: string, options?: TypeOptions): Promise; /** * 聚焦元素 */ focus(): Promise; /** * 高亮闪烁元素 */ flash(options?: FlashOptions, ...propNames: string[]): Promise; /** * 鼠标悬停在元素上 */ hover(options?: { duration?: number; humanize?: boolean; }, ...propNames: string[]): Promise; readonly windowSelector: string; readonly findSelector: string; _client: import("./client").HttpClient; _info: import("./types").ElementInfo; _autoWaitConfig: import("./types").AutoWaitConfig; _logger: import("./logger").OperationLogger; _cacheTime: any; readonly selector: string; readonly foundElementCount: number; name(): Promise; text(): Promise; isEnabled(): Promise; isVisible(): Promise; isOffscreen(): Promise; get attrs(): import("./types").ElementInfo; attr(name: string): Promise; bounds(): Promise; boundingBox(): Promise; isCheckable(): Promise; isChecked(): Promise; isClickable(): Promise; isScrollable(): Promise; isSelected(): Promise; _maybeAutoWait(phase: string): Promise; toJSON(): { selector: string; window: string; findSelector: string; info: import("./types").ElementInfo; }; }; } & T; /** * ElementUiaActions - UiaElement 专属操作 mixin * * 包含:dragTo、scroll(需 xpath 定位目标/容器,ImageElement 不支持) */ export declare function ElementUiaActions ElementCore>(Base: T): { new (...args: any[]): { /** * 拖拽当前元素到目标元素 */ dragTo(target: any, options?: { duration?: number; propNames?: string[]; targetPropNames?: string[]; }): Promise; /** * 在当前元素上执行纯滚动(鼠标悬停 + 滚轮)。 * * 仅负责滚动,不等待元素出现、不居中、不自适应。 * 如需"滚到目标可见",请用 {@link UiaElement.scrollToVisible}。 * * @param options - 滚动选项 * @param options.direction - 滚动方向:'up'(视口上移看上方)或 'down'(视口下移看下方) * @param options.amount - 总滚动量(WHEEL_DELTA 单位,120=1次滚轮),内部按 120/次拆分。优先于 times * @param options.times - 滚动次数,默认 1。amount 优先时忽略 * @param options.scrollInterval - 每次滚动间隔(ms),默认 300 * @param options.propNames - 用于构造唯一 XPath 的属性名列表 * * @returns 滚动结果 { scrolled: 实际滚动次数 } * * @example * await el.scroll({ direction: 'down', amount: 1000 }); // 向下滚 1000 单位(≈8 次) * await el.scroll({ direction: 'up', times: 3 }); // 向上滚 3 次 */ scroll(options: ScrollOptions): Promise<{ scrolled: number; }>; readonly windowSelector: string; readonly findSelector: string; _client: import("./client").HttpClient; _info: import("./types").ElementInfo; _autoWaitConfig: import("./types").AutoWaitConfig; _logger: import("./logger").OperationLogger; _cacheTime: any; readonly selector: string; readonly foundElementCount: number; name(): Promise; text(): Promise; isEnabled(): Promise; isVisible(): Promise; isOffscreen(): Promise; get attrs(): import("./types").ElementInfo; attr(name: string): Promise; bounds(): Promise; boundingBox(): Promise; isCheckable(): Promise; isChecked(): Promise; isClickable(): Promise; isScrollable(): Promise; isSelected(): Promise; _maybeAutoWait(phase: string): Promise; toJSON(): { selector: string; window: string; findSelector: string; info: import("./types").ElementInfo; }; }; } & T;