// Generated by dts-bundle v0.7.3 // Dependencies for this module: // ../selenium-webdriver // ../atma-utils // ../node-fetch declare module 'selenium-query' { import { WebdriverQuery } from 'selenium-query/webdriver/WebdriverQuery'; import { CookieContainer } from 'selenium-query/common/CookieContainer'; import { BrowserNetworkInterceptor } from 'selenium-query/webdriver/network/BrowserNetworkInterceptor'; import { BrowserNetworkMonitor } from 'selenium-query/webdriver/network/BrowserNetworkMonitor'; class SQuery extends WebdriverQuery { static default: typeof SQuery; static CookieContainer: typeof CookieContainer; static BrowserNetworkInterceptor: typeof BrowserNetworkInterceptor; static BrowserNetworkMonitor: typeof BrowserNetworkMonitor; } export = SQuery; } declare module 'selenium-query/webdriver/WebdriverQuery' { import { IPseudoSelectorFn } from 'selenium-query/common/SelectorsEx'; import { NetworkTracer } from 'selenium-query/fetch/NetworkTracer'; import { NetworkResponse } from 'selenium-query/fetch/NetworkDriver'; import { IQueryStatics } from 'selenium-query/common/IQueryStatics'; import { WebDriver } from 'selenium-webdriver'; import { IElement, IDriver, IDriverManager } from 'selenium-query/common/IDriver'; import { Deferred } from 'selenium-query/types/Deferred'; import { IQuery, IQueryConditionFn, IQueryWaitOptions } from 'selenium-query/common/IQuery'; import { IWebdriverBuildConfig } from 'selenium-query/webdriver/Webdriver'; import { IBuildConfig, ILoadConfig, ISettings } from 'selenium-query/common/IConfig'; import { IJsdomBuildConfig } from 'selenium-query/jsdom/JsdomDriver'; import { ICheerioBuildConfig } from 'selenium-query/cheerio/CheerioDriver'; import { WebdriverFormData } from 'selenium-query/webdriver/WebdriverFormData'; import { FormDataBase } from 'selenium-query/common/FormDataBase'; import { type WebElement } from 'selenium-webdriver'; import { JsdomQuery } from 'selenium-query/jsdom/JsdomQuery'; import { CherrioQuery } from 'selenium-query/cheerio/CherrioQuery'; export type WebdriverQuerySync = Omit; export class WebdriverQuery extends IQuery { protected hasClassFn(node: IElement, name: string): Deferred; protected addClassFn(node: IElement, name: string): Deferred; protected removeClassFn(node: IElement, name: string): Deferred; protected toggleClassFn(node: IElement, name: string): Deferred; protected textGetFn(node: IElement): Deferred; protected textSetFn(node: IElement, text: string): Deferred; protected htmlOuterGetFn(node: IElement): Deferred; protected htmlGetFn(node: IElement): Deferred; protected htmlSetFn(node: IElement, text: string): Deferred; protected appendFn(node: IElement, html: string): Deferred; protected prependFn(node: IElement, html: string): Deferred; protected beforeFn(node: IElement, html: string): Deferred; protected afterFn(node: IElement, html: string): Deferred; protected cssGet(node: IElement, prop: string): Promise; protected cssSet(node: IElement, css: { [key: string]: any; }): Deferred; protected heightGetFn(node: IElement): Promise; protected widthGetFn(node: IElement): Promise; protected innerHeightFn(node: IElement): Promise; protected innerWidthFn(node: IElement): Promise; protected getBoundingClientRect(node: IElement): Promise<{ top: number; left: number; width: number; height: number; }>; protected getPosition(node: IElement): Promise<{ top: number; left: number; }>; protected scrollTopGetFn(node: IElement): Promise; protected scrollTopSetFn(node: IElement, scroll: number): Deferred; protected scrollLeftGetFn(node: IElement): Promise; protected scrollLeftSetFn(node: IElement, scroll: number): Deferred; protected evalFn(node: IElement, mix: Function | string, ...args: any[]): Promise; protected clickFn(node: IElement): Promise; protected triggerFn(node: IElement, type: string, ...args: any[]): Promise; protected selectFn(node: IElement, ...args: any[]): Promise; protected focusFn(node: IElement): Promise; protected blurFn(node: IElement): Promise; protected sendKeysFn(node: IElement, mix: any): Promise; protected typeFn(node: IElement, str: string): Promise; protected pressFn(node: IElement, str: string): Promise; protected removeFn(node: IElement): Promise; protected attrGetFn(node: IElement, prop: string): Promise; protected attrSetFn(node: IElement, attr: { [key: string]: any; }): Deferred; protected valGetFn(node: IElement): Promise; protected valSetFn(node: IElement, value: any): Deferred; protected dataGetFn(node: IElement, key: string): Promise; protected dataSetFn(node: IElement, data: object): Deferred; protected propGetFn(node: IElement, key: string): Promise; protected propSetFn(node: IElement, data: object): Deferred; protected findFn(node: IElement, selector: string): Deferred; protected matchesFn(node: IElement, selector: string): Promise; protected parentFn(node: IElement): Deferred; protected closestFn(node: IElement, sel: string): Promise; protected childrenFn(node: IElement, sel?: string): Promise; protected nextFn(node: IElement, sel?: string): Promise; protected getField(node: IElement, field: string): Deferred; protected setField(node: IElement, obj: any): Deferred; protected setField(node: IElement, field: string, val: any): Deferred; protected callField(node: IElement, field: string, ...args: any[]): Deferred; protected _onFn(node: IElement, type: string, cb: Function): Promise; protected _offFn(node: IElement, type: string, cb?: Function): Promise; protected _onOnceFn(node: IElement, type: string, cb: Function): Promise; manage(): IDriverManager; waitForPageLoad(urlPattern?: string | RegExp): IQuery; waitForPageReady(urlPattern?: string | RegExp): IQuery; waitForElement(selector: string, opts?: IQueryWaitOptions): IQuery; waitForElement(selector: string, check?: IQueryConditionFn): IQuery; waitForNoElement(selector: string, opts?: IQueryWaitOptions): IQuery; waitForNoElement(selector: string, check?: IQueryConditionFn): IQuery; waitForResource(selector: string): IQuery; unlock(): void; getDriver(): WebDriver; createFormData(): Promise; static FormData: typeof FormDataBase; static build(config: IBuildConfig, setts?: ISettings): IQuery; static load(url: string, config: IJsdomBuildConfig, setts?: ISettings): JsdomQuery; static load(url: string, config: ICheerioBuildConfig, setts?: ISettings): CherrioQuery; static load(url: string, config?: IWebdriverBuildConfig, setts?: ISettings): WebdriverQuery; static fetch(url: string, config?: ILoadConfig & { baseUrl?: string; }, setts?: ISettings): Promise<{ status: number; headers: { [lowerCased: string]: string; }; data: T; }>; static setDriver(driver: IDriver): void; static getDriver(config: IBuildConfig, setts?: ISettings): Promise; static unlockDriver(mix: any): void; static newAsync(mix?: any, parent?: IQuery): WebdriverQuery; static cheerio: IQueryStatics>; static jsdom: IQueryStatics>; static network: { isCached(url: string, config?: ILoadConfig & { fetcher?: any; }): boolean; isCachedAsync(url: string, config?: ILoadConfig & { fetcher?: any; }): Promise; clearCookies(): void; clearCached(url: string, config?: ILoadConfig & { fetcher?: any; }): void; load(url: string, config?: ILoadConfig & { fetcher?: any; }): Promise>; getCookies(url?: string): string; setCookies(url: string, cookies: string | string[] | { [key: string]: string; }, opts: { extend: boolean; }): void; tracer: NetworkTracer; }; static pseudo: { [key: string]: IPseudoSelectorFn | { isNodeFilter: boolean; fn: ($: IQuery, arg?: string) => IQuery | Promise>; }; }; } } declare module 'selenium-query/common/CookieContainer' { interface ICookie { key: string; value: string; rawOptions?: string; } class DomainCookies { domain: string; arr: ICookie[]; constructor(domain: string); add(mix: string | string[] | { [key: string]: string; }, opts?: { extend: boolean; }): void; stringify(): string; } export class CookieContainer { domains: { [domain: string]: DomainCookies; }; addCookies(cookies: string | string[] | { [key: string]: string; }): any; addCookies(url: string, cookies: string | string[] | { [key: string]: string; }): any; addCookies(url: string, cookies: string | string[] | { [key: string]: string; }, opts: { extend: boolean; }): any; clearCookies(): void; getCookies(url?: string): string; } export const cookieContainer: CookieContainer; export {}; } declare module 'selenium-query/webdriver/network/BrowserNetworkInterceptor' { export class BrowserNetworkInterceptor { wsConnection: any; static start(driver: any): Promise; constructor(wsConnection: any); interceptions: { urlMatch: RegExp; response: { status?: number; headers?: Record; body: string | any; }; }[]; register(params: { match: RegExp; response: BrowserNetworkInterceptor['interceptions'][0]['response']; }): void; } } declare module 'selenium-query/webdriver/network/BrowserNetworkMonitor' { import { class_EventEmitter } from 'atma-utils'; import { WebDriver } from 'selenium-webdriver'; export interface INetworkMonitorRequest { requestId: string; request: { url: string; method: string; headers: Record; date: number; }; response: { status: number; headers: Record; date: number; }; } interface IBrowserNetworkMonitorEvents { requestWillBeSent(req: INetworkMonitorRequest): any; loadingFinished(req: INetworkMonitorRequest): any; responseReceived(req: INetworkMonitorRequest): any; } type TRequestFilter = (req: INetworkMonitorRequest['request']) => boolean; export class BrowserNetworkMonitor extends class_EventEmitter { static start(driver: WebDriver & { createCDPConnection?: any; _wsConnection?: WebSocket; }): Promise; constructor(driver: any, wsConnection: any); getRequest(regexp?: RegExp): INetworkMonitorRequest; getRequest(filter?: TRequestFilter): INetworkMonitorRequest; getRequest(mix?: RegExp | TRequestFilter): INetworkMonitorRequest; getRequests(regexp?: RegExp): INetworkMonitorRequest[]; getRequests(filter?: TRequestFilter): INetworkMonitorRequest[]; getRequests(mix?: RegExp | TRequestFilter): INetworkMonitorRequest[]; getResponseBody(req: INetworkMonitorRequest): Promise<{ base64Encoded: any; body: any; }>; getRequestBody(req: INetworkMonitorRequest): Promise<{ body: any; }>; } export {}; } declare module 'selenium-query/common/SelectorsEx' { import { IQuery } from 'selenium-query/common/IQuery'; export interface IPseudoSelectorFn { ($: IQuery, arg: string): boolean | Promise; } export namespace SelectorsEx { const pseudoFns: { [key: string]: IPseudoSelectorFn | { isNodeFilter: boolean; fn: ($: IQuery, arg?: string) => (IQuery | Promise>); }; }; function register(name: string, fn: IPseudoSelectorFn): void; function find(el: IQuery, selector: string, find: (el: IQuery, selector: string) => IQuery): IQuery; } } declare module 'selenium-query/fetch/NetworkTracer' { import { class_EventEmitter } from 'atma-utils'; export class NetworkTracer extends class_EventEmitter { active: boolean; spans: NetworkSpan[]; createSpan(req: IReq): NetworkSpan; onComplete(cb: (span: NetworkSpan) => void): void; clear(): void; } export class NetworkSpan extends class_EventEmitter { startTime: Date; endTime: Date; res: IRes; req: IReq; cached: boolean; constructor(req: IReq); complete(res: IRes): void; } interface IReq { method: string; url: string; headers: { [name: string]: string; }; body: any; } interface IRes { url: string; status: number; headers: { [name: string]: string; }; body: any; } export {}; } declare module 'selenium-query/fetch/NetworkDriver' { import fetch from 'node-fetch'; import { ILoadConfig } from "selenium-query/common/IConfig"; import { NetworkTracer } from 'selenium-query/fetch/NetworkTracer'; type INetworkDriverLoadConfig = ILoadConfig & { fetcher?: typeof fetch; }; export const NetworkDriver: { isCached(url: string, config?: INetworkDriverLoadConfig): boolean; isCachedAsync(url: string, config?: INetworkDriverLoadConfig): Promise; clearCookies(): void; clearCached(url: string, config?: INetworkDriverLoadConfig): void; load(url: string, config?: INetworkDriverLoadConfig): Promise>; getCookies(url?: string): string; setCookies(url: string, cookies: string | string[] | { [key: string]: string; }, opts: { extend: boolean; }): void; tracer: NetworkTracer; }; export interface NetworkResponse { status: number; message?: string; headers: { [name: string]: string; }; url: string; body: T; } export {}; } declare module 'selenium-query/common/IQueryStatics' { import { WebdriverQuery } from 'selenium-query/webdriver/WebdriverQuery'; import { IBuildConfig, ISettings, ILoadConfig } from "selenium-query/common/IConfig"; import { IQuery } from "selenium-query/common/IQuery"; import { SelectorsEx } from 'selenium-query/common/SelectorsEx'; export interface IQueryStatics = IQuery> { fromHtml(html: string): TQuery; build(config: IBuildConfig, setts?: ISettings): TQuery; load(url: string, config: ILoadConfig, setts?: ISettings): TQuery; unlockDriver(mix: any): any; fetch(url: string, config?: ILoadConfig & { baseUrl?: string; }, setts?: ISettings): Promise<{ status: number; headers: { [lowerCased: string]: string; }; data: T; }>; pseudo: typeof SelectorsEx.pseudoFns; [key: string]: any; } } declare module 'selenium-query/common/IDriver' { import { WebDriver, WebElement } from 'selenium-webdriver'; export type IDriver = WebDriver; export interface IDriverManager { addCookie(cookie: any): Promise; } export interface IThenableDriver extends Promise, IDriver { } export type IElement = WebElement; } declare module 'selenium-query/types/Deferred' { export interface Deferred extends Promise { done(cb: (x: T) => void | any): this; fail(cb: (error: Error) => void | any): this; } } declare module 'selenium-query/common/IQuery' { import { class_Dfr } from 'atma-utils'; import { Deferred } from 'selenium-query/types/Deferred'; export class IQueryCtx { owner: IQuery; self: IQuery; source: string; url: string; status: number; headers: { [key: string]: string; }; breadcrumbs: string[]; thener: (resolve: any, reject: any) => IQuery; Ctor: new (mix?: any) => IQuery; newSync(arr?: any, parent?: IQuery): IQuery; newAsync(arr?: any, parent?: IQuery): IQuery; static copyFrom(targetCtx: IQueryCtx, parentCtx: IQueryCtx): IQueryCtx; } export type IQuerySync = Omit, 'then' | 'resolve' | 'reject' | 'done' | 'fail'>; export type TSync> = Omit; export abstract class IQuery & { then: never; } = any> extends class_Dfr implements PromiseLike { [index: number]: TElement; length: number; ctx: IQueryCtx; constructor(mix?: any); get [Symbol.toStringTag](): string; ensureSync(): IQuery; ensureAsync(): IQuery; resolve(...args: any[]): this; wait(ms: number): IQuery; require(opts?: { count?: number; }): IQuery; hasClass(name: string): PromiseLike; protected abstract hasClassFn(node: TElement, name: string): Deferred; addClass(name: string): IQuery; protected abstract addClassFn(node: TElement, name: string): Deferred; removeClass(name: string): IQuery; protected abstract removeClassFn(node: TElement, name: string): Deferred; toggleClass(name: string): IQuery; protected abstract toggleClassFn(node: TElement, name: string): Deferred; add(mix: any): any; eq(index: number): IQuery; get(index: number): TElement; slice(start?: number, end?: number): IQuery; each(fn: (node: TElement, i?: number) => void | TElement | any): IQuery; map(fn: (node: IQuery, i?: number) => TResult): IQuery ? Awaited : TResult, any>; toArray(): Promise; as(): T; use IQuery>(Ctor: TCtor): InstanceType; text(): PromiseLike; text(str: string): IQuery; protected abstract textGetFn(node: TElement): Deferred; protected abstract textSetFn(node: TElement, text: string): Deferred; html(): PromiseLike; html(str: string): IQuery; outerHtml(): PromiseLike; protected abstract htmlGetFn(node: TElement): Deferred; protected abstract htmlOuterGetFn(node: TElement): Deferred; protected abstract htmlSetFn(node: TElement, text: string): Deferred; append(html: string): IQuery; protected abstract appendFn(node: TElement, html: string): Deferred; prepend(html: string): IQuery; protected abstract prependFn(node: TElement, html: string): Deferred; before(html: string): IQuery; protected abstract beforeFn(node: TElement, html: string): Deferred; after(html: string): IQuery; protected abstract afterFn(node: TElement, html: string): Deferred; css(cssObj: { [key: string]: any; }): IQuery; css(key: string, val: any): IQuery; css(key: string): Promise; protected abstract cssGet(node: TElement, prop: string): Promise; protected abstract cssSet(node: TElement, css: { [key: string]: any; }): Deferred; height(): Promise; height(val: any): IQuery; protected abstract heightGetFn(node: TElement): Promise; innerHeight(): PromiseLike; protected abstract innerHeightFn(node: TElement): Promise; width(): Promise; width(val: any): IQuery; protected abstract widthGetFn(node: TElement): Promise; innerWidth(): PromiseLike; protected abstract innerWidthFn(node: TElement): Promise; offset(): Promise<{ top: number; left: number; }>; protected abstract getBoundingClientRect(node: TElement): Promise<{ top: number; left: number; width: number; height: number; }>; position(): Promise<{ top: number; left: number; }>; protected abstract getPosition(node: TElement): Promise<{ top: number; left: number; }>; scrollTop(): Promise; scrollTop(scroll: number): IQuery; protected abstract scrollTopGetFn(node: TElement): Promise; protected abstract scrollTopSetFn(node: TElement, scroll: number): Deferred; scrollLeft(): Promise; scrollLeft(scroll: number): IQuery; protected abstract scrollLeftGetFn(node: TElement): Promise; protected abstract scrollLeftSetFn(node: TElement, scroll: number): Deferred; eval(mix: Function | string, ...args: any[]): Promise; protected abstract evalFn(node: TElement, mix: Function | string, ...args: any[]): Promise; click(): IQuery; protected abstract clickFn(node: TElement): Promise; trigger(type: any, ...args: any[]): IQuery; protected abstract triggerFn(node: TElement, type: string, ...args: any[]): Promise; select(...args: any[]): IQuery; protected abstract selectFn(node: TElement, ...args: any[]): Promise; focus(): IQuery; protected abstract focusFn(node: TElement): Promise; blur(): IQuery; protected abstract blurFn(node: TElement): Promise; sendKeys(mix: string): IQuery; protected abstract sendKeysFn(node: TElement, mix: any): Promise; type(str: string): IQuery; protected abstract typeFn(node: TElement, str: string): Promise; press(str: string): IQuery; protected abstract pressFn(node: TElement, str: string): Promise; remove(): IQuery; protected abstract removeFn(node: TElement): Promise; attr(name: string): Promise; attr(vals: { [key: string]: any; }): IQuery; attr(key: string, val: any): IQuery; protected abstract attrGetFn(node: TElement, prop: string): Promise; protected abstract attrSetFn(node: TElement, attr: { [key: string]: any; }): Deferred; val(): PromiseLike; val(val: any): IQuery; protected abstract valGetFn(node: TElement): Promise; protected abstract valSetFn(node: TElement, value: any): Deferred; data(key: string): PromiseLike; data(key: string, val: any): IQuery; data(dataObj: { [key: string]: any; }): IQuery; protected abstract dataGetFn(node: TElement, key: string): Promise; protected abstract dataSetFn(node: TElement, data: object): Deferred; prop(key: string): PromiseLike; prop(key: string, val: any): IQuery; prop(obj: { [key: string]: any; }): IQuery; protected abstract propGetFn(node: TElement, key: string): Promise; protected abstract propSetFn(node: TElement, data: object): Deferred; find(sel: string): IQuery; protected abstract findFn(node: TElement, selector: string): Deferred; filter(fn: (node: TElement) => boolean | Promise): IQuery; filter(sel: string): IQuery; protected abstract matchesFn(node: TElement, selector: string): Promise; parent(): IQuery; protected abstract parentFn(node: TElement): Promise; closest(sel: string): IQuery; protected abstract closestFn(node: TElement, sel: string): Promise; children(sel?: string): IQuery; protected abstract childrenFn(node: TElement, sel?: string): Promise; next(sel?: string): IQuery; protected abstract nextFn(node: TElement, sel?: string): Promise; protected abstract getField(node: TElement, field: string): Deferred; protected abstract setField(node: TElement, obj: any): Deferred; protected abstract setField(node: TElement, field: string, val: any): Deferred; protected abstract callField(node: TElement, field: string, ...args: any[]): Deferred; on(type: string, cb: (el: TElement) => void): IQuery; off(type: string, cb: Function): IQuery; once(type: string, cb?: (event: any) => void): IQuery; protected abstract _onFn(node: TElement, type: string, cb: Function): Promise; protected abstract _onOnceFn(node: TElement, type: string, cb: Function): Promise; protected abstract _offFn(node: TElement, type: string, cb: Function): Promise; abstract waitForElement(selector: string, mix?: IQueryWaitOptions | IQueryConditionFn): IQuery; } export interface IQueryConditionFn { ($: IQuery): Promise; } export interface IQueryWaitOptions { hidden?: boolean; visible?: boolean; check?: IQueryConditionFn; interval?: number; timeout?: number; /** execute any other code while waiting. */ tick?: () => Promise; } } declare module 'selenium-query/webdriver/Webdriver' { import { IBuildConfig } from "selenium-query/common/IConfig"; import { WebdriverQuery } from "selenium-query/webdriver/WebdriverQuery"; import { IQueryStatics } from "selenium-query/common/IQueryStatics"; import { type WebDriver } from 'selenium-webdriver'; export interface IWebdriverBuildConfig extends IBuildConfig { name?: 'Chrome' | 'Firefox' | 'Edge' | string; driver?: WebDriver; } export const Webdriver: IQueryStatics; } declare module 'selenium-query/common/IConfig' { import type { WebDriver } from 'selenium-webdriver'; import { IQuery } from "selenium-query/common/IQuery"; import { CookieContainer } from 'selenium-query/common/CookieContainer'; export interface IBuildConfig { args?: string[]; binaryPath?: string; applyOptions?(builder: any, options: any): any; setOptions?(builder: any, options: any): any; setArguments?(options: any): any; setBinaryPath?(options: any): any; setLogging?(options: any): any; /** Configurate driver before page is loaded. You can set e.g. the chrome dev tools commands: https://chromedevtools.github.io/devtools-protocol/ */ setDriverConfiguration?(driver: WebDriver): Promise; headers?: { [name: string]: string; } | string; method?: 'post' | 'get' | 'delete' | 'patch' | 'head' | string; query?: { [name: string]: string; }; body?: string | Buffer | any; cookies?: { [name: string]: string; } | string[] | string; cookiesDefault?: { [name: string]: string; } | string[] | string; cache?: boolean | { folder?: string; maxAge?: number | string; compress?: boolean; }; cacheQueryIgnore?: string[]; /** Webdriver will load this url, or requested url, to set the cookies first */ cookieOrigin?: string; cookieContainer?: CookieContainer; [key: string]: any; } export interface ILoadConfig extends IBuildConfig { retryCount?: number; retryTimeout?: number; follow?: number; httpsProxy?: string | { url: string; username?: string; password?: string; }; ignoreSSLErrors?: boolean; /** optional timeout in ms */ timeoutMs?: number; doNotThrow?: boolean; /** default: true */ includeDefaultHeaders?: boolean; /** default: true */ includeCookies?: boolean; } export interface ISettings { pool?: boolean | number; query?: IQuery; opts?: { deserialize?: boolean; [key: string]: any; }; } } declare module 'selenium-query/jsdom/JsdomDriver' { import { IQueryStatics } from 'selenium-query/common/IQueryStatics'; import { IBuildConfig } from "selenium-query/common/IConfig"; export interface IJsdomBuildConfig extends IBuildConfig { name: 'jsdom'; html?: string; fragment?: boolean; } export const JsdomDriver: IQueryStatics; } declare module 'selenium-query/cheerio/CheerioDriver' { import { IQueryStatics } from 'selenium-query/common/IQueryStatics'; import { IBuildConfig } from "selenium-query/common/IConfig"; export interface ICheerioBuildConfig extends IBuildConfig { name: 'cheerio'; html: string; } export const CheerioDriver: IQueryStatics; } declare module 'selenium-query/webdriver/WebdriverFormData' { import { IElement } from 'selenium-query/common/IDriver'; import { IQuery } from 'selenium-query/common/IQuery'; type TFormDataFile = { file: string; }; export class WebdriverFormData { $: IQuery; form: IElement; formId: string; protected constructor($: IQuery, form: IElement, formId: string); append(name: string, value: string | number | TFormDataFile): Promise; static create($: IQuery): Promise; } export {}; } declare module 'selenium-query/common/FormDataBase' { export class FormDataBase { dict: any; append(key: string, value: string | number | { file: string; }): this; entries(): [string, any][]; } } declare module 'selenium-query/jsdom/JsdomQuery' { import { IQuery, IQueryConditionFn } from 'selenium-query/common/IQuery'; import { IBuildConfig, ISettings } from 'selenium-query/common/IConfig'; import { IDriver } from 'selenium-query/common/IDriver'; import { Deferred } from 'selenium-query/types/Deferred'; export class JsdomQuery extends IQuery { waitForElement(selector: string, mix?: { visible?: boolean; check?: IQueryConditionFn; } | IQueryConditionFn): IQuery; protected _onFn(node: Element, type: string, cb: Function): Promise; protected _onOnceFn(node: Element, type: string, cb: Function): Promise; protected _offFn(node: Element, type: string, cb: Function): Promise; hasClassFn(node: Element, name: string): Deferred; addClassFn(node: Element, name: string): Deferred; removeClassFn(node: Element, name: string): Deferred; toggleClassFn(node: Element, name: string): Deferred; textGetFn(node: Element): Deferred; textSetFn(node: Element, text: string): Deferred; htmlOuterGetFn(node: Element): Deferred; htmlGetFn(node: Element): Deferred; htmlSetFn(node: Element, text: string): Deferred; appendFn(node: Element, html: string): Deferred; prependFn(node: Element, html: string): Deferred; beforeFn(node: Element, html: string): Deferred; afterFn(node: Element, html: string): Deferred; cssGet(node: HTMLElement, prop: string): Promise; cssSet(node: HTMLElement, css: { [key: string]: any; }): Deferred; heightGetFn(node: HTMLElement): Promise; widthGetFn(node: HTMLElement): Promise; innerHeightFn(node: Element): Promise; innerWidthFn(node: Element): Promise; getBoundingClientRect(node: HTMLElement): Promise<{ top: number; left: number; width: number; height: number; }>; getPosition(node: Element): Promise<{ top: number; left: number; }>; scrollTopGetFn(node: Element): Promise; scrollTopSetFn(node: Element, scroll: number): Deferred; scrollLeftGetFn(node: Element): Promise; scrollLeftSetFn(node: Element, scroll: number): Deferred; evalFn(node: Element, mix: Function | string, ...args: any[]): Promise; clickFn(node: HTMLElement): Promise; triggerFn(node: HTMLElement, type: string, ...args: any[]): Promise; selectFn(node: Element, ...args: any[]): Promise; focusFn(node: Element): Promise; blurFn(node: Element): Promise; sendKeysFn(node: Element, mix: any): Promise; typeFn(node: Element, str: string): Promise; pressFn(node: Element, str: string): Promise; removeFn(node: HTMLElement): Promise; attrGetFn(node: HTMLElement, prop: string): Promise; attrSetFn(node: Element, attr: { [key: string]: any; }): Deferred; valGetFn(node: Element): Promise; valSetFn(node: Element, value: any): Deferred; dataGetFn(node: HTMLElement, key: string): Promise; dataSetFn(node: HTMLElement, data: object): Deferred; protected propGetFn(node: HTMLElement, key: string): Promise; protected propSetFn(node: Element, data: object): Deferred; findFn(node: Element, selector: string): Deferred; matchesFn(node: Element, selector: string): Deferred; parentFn(node: Element): Promise; closestFn(node: Element, sel: string): Promise; childrenFn(node: Element, sel?: string): Promise; nextFn(node: Element, sel?: string): Promise; protected getField(node: Element, field: string): Deferred; protected setField(node: Element, obj: any): Deferred; protected setField(node: Element, field: string, val: any): Deferred; protected callField(node: Element, field: string, ...args: any[]): Deferred; static newAsync(mix?: any, parent?: IQuery): JsdomQuery; unlock(): void; static build(config: IBuildConfig, setts?: ISettings): Promise; static load(url: string, config: IBuildConfig, setts?: ISettings): JsdomQuery; static fetch(url: string, config?: IBuildConfig, setts?: ISettings): JsdomQuery; static setDriver(driver: IDriver): void; static getDriver(config: IBuildConfig, setts?: ISettings): Promise; static unlockDriver(mix: any): void; } } declare module 'selenium-query/cheerio/CherrioQuery' { import { IQuery, IQueryConditionFn } from 'selenium-query/common/IQuery'; import { IBuildConfig, ISettings } from 'selenium-query/common/IConfig'; import { IDriver } from 'selenium-query/common/IDriver'; import { Deferred } from 'selenium-query/types/Deferred'; export class CherrioQuery extends IQuery { waitForElement(selector: string, mix?: { visible?: boolean; check?: IQueryConditionFn; } | IQueryConditionFn): IQuery; protected _onFn(node: CheerioElement, type: string, cb: Function): Promise; protected _onOnceFn(node: CheerioElement, type: string, cb: Function): Promise; protected _offFn(node: CheerioElement, type: string, cb: Function): Promise; hasClassFn(node: CheerioElement, name: string): Deferred; addClassFn(node: CheerioElement, name: string): Deferred; removeClassFn(node: CheerioElement, name: string): Deferred; toggleClassFn(node: CheerioElement, name: string): Deferred; textGetFn(node: CheerioElement): Deferred; textSetFn(node: CheerioElement, text: string): Deferred; htmlOuterGetFn(node: CheerioElement): Deferred; htmlGetFn(node: CheerioElement): Deferred; htmlSetFn(node: CheerioElement, text: string): Deferred; appendFn(node: CheerioElement, html: string): Deferred; prependFn(node: CheerioElement, html: string): Deferred; beforeFn(node: CheerioElement, html: string): Deferred; afterFn(node: CheerioElement, html: string): Deferred; cssGet(node: CheerioElement, prop: string): Promise; cssSet(node: CheerioElement, css: { [key: string]: any; }): Deferred; heightGetFn(node: CheerioElement): Promise; widthGetFn(node: CheerioElement): Promise; innerHeightFn(node: CheerioElement): Promise; innerWidthFn(node: CheerioElement): Promise; getBoundingClientRect(node: CheerioElement): Promise<{ top: number; left: number; width: number; height: number; }>; getPosition(node: CheerioElement): Promise<{ top: number; left: number; }>; scrollTopGetFn(node: CheerioElement): Promise; scrollTopSetFn(node: CheerioElement, scroll: number): Deferred; scrollLeftGetFn(node: CheerioElement): Promise; scrollLeftSetFn(node: CheerioElement, scroll: number): Deferred; evalFn(node: CheerioElement, mix: Function | string, ...args: any[]): Promise; clickFn(node: CheerioElement): Promise; triggerFn(node: CheerioElement, type: string, ...args: any[]): Promise; selectFn(node: CheerioElement, ...args: any[]): Promise; focusFn(node: CheerioElement): Promise; blurFn(node: CheerioElement): Promise; sendKeysFn(node: CheerioElement, mix: any): Promise; typeFn(node: CheerioElement, str: string): Promise; pressFn(node: CheerioElement, str: string): Promise; removeFn(node: CheerioElement): Promise; attrGetFn(node: CheerioElement, prop: string): Promise; attrSetFn(node: CheerioElement, attr: { [key: string]: any; }): Deferred; valGetFn(node: CheerioElement): Promise; valSetFn(node: CheerioElement, value: any): Deferred; dataGetFn(node: CheerioElement, key: string): Promise; dataSetFn(node: CheerioElement, data: object): Deferred; protected propGetFn(node: CheerioElement, key: string): Promise; protected propSetFn(node: CheerioElement, data: object): Deferred; findFn(node: CheerioElement, selector: string): Deferred; matchesFn(node: CheerioElement, selector: string): Deferred; parentFn(node: CheerioElement): Promise; closestFn(node: CheerioElement, sel: string): Promise; childrenFn(node: CheerioElement, sel?: string): Promise; nextFn(node: CheerioElement, sel?: string): Promise; protected getField(node: CheerioElement, field: string): Deferred; protected setField(node: CheerioElement, obj: any): Deferred; protected setField(node: CheerioElement, field: string, val: any): Deferred; protected callField(node: CheerioElement, field: string, ...args: any[]): Deferred; static newAsync(mix?: any, parent?: IQuery): CherrioQuery; unlock(): void; static build(config: IBuildConfig, setts?: ISettings): Promise; static load(url: string, config: IBuildConfig, setts?: ISettings): CherrioQuery; static fetch(url: string, config?: IBuildConfig, setts?: ISettings): CherrioQuery; static setDriver(driver: IDriver): void; static getDriver(config: IBuildConfig, setts?: ISettings): Promise; static unlockDriver(mix: any): void; } }