flagpole
Version:
Simple and fast DOM integration, headless or headful browser, and REST API testing framework.
24 lines (23 loc) • 1.25 kB
TypeScript
/// <reference types="cheerio" />
import { HttpResponse } from "../httpresponse";
import { DOMResponse } from "./domresponse";
import { iResponse, iValue, FindAllOptions, FindOptions } from "../interfaces";
import { ResponseType } from "../enums";
export declare class HtmlResponse extends DOMResponse implements iResponse {
private _cheerio;
protected set cheerio(value: CheerioStatic);
protected get cheerio(): CheerioStatic;
get responseTypeName(): string;
get responseType(): ResponseType;
init(httpResponse: HttpResponse): void;
getRoot(): CheerioStatic;
eval(): Promise<any>;
find(selector: string, a?: string | RegExp | FindOptions, b?: FindOptions): Promise<iValue>;
findAll(selector: string, a?: string | RegExp | FindAllOptions, b?: FindAllOptions): Promise<iValue[]>;
waitForHidden(selector: string, timeout?: number): Promise<iValue>;
waitForVisible(selector: string, timeout?: number): Promise<iValue>;
waitForExists(selector: string, timeout?: number): Promise<iValue>;
waitForHavingText(selector: string, text: string, timeout?: number): Promise<iValue>;
type(selector: string, textToType: string, opts?: any): Promise<any>;
clear(selector: string): Promise<any>;
}