@assert-equals/dappdriver
Version:
DappDriver is an e2e testing framework designed for testing decentralized applications (dApps) using MetaMask, Rainbow or Zerion
40 lines (39 loc) • 2.06 kB
TypeScript
import { IPageObject } from '../interface/page/page-object';
import { IConfirmation } from '../interface/wallet/confirmation';
import { Comparator, Cookie } from '../types';
export declare class WebDriverPageObject implements IPageObject {
private driver;
url: string | RegExp;
title: string;
constructor();
addCookie(cookie: Cookie): Promise<void>;
back<TPage>(page?: new () => TPage): Promise<any>;
clearCookie(name: string): Promise<void>;
clearCookies(): Promise<void>;
close<TPage>(page?: new () => TPage): Promise<any>;
closeAndSwitchToMainWindow<TPage>(page?: new () => TPage): Promise<any>;
createNewWindow(): Promise<void>;
executeScript(script: string): Promise<any>;
executeScriptAndOpensInWindow<TPage extends IConfirmation | IPageObject>(script: string, page: new () => TPage): Promise<any>;
getAllWindowHandles(): Promise<Array<string>>;
getCookie(name: string): Promise<any>;
getCookies(): Promise<Array<any>>;
getCurrentUrl(): Promise<string>;
getTitle(): Promise<string>;
getWindowHandle(): Promise<string>;
maximize(): Promise<void>;
navigateTo<TPage>(url: string, page?: new () => TPage): Promise<any>;
navigateToPageInNewWindow<TPage>(url: string, page?: new () => TPage): Promise<any>;
opensInNewWindow<TPage>(page?: new () => TPage): Promise<any>;
opensInWindow<TPage extends IConfirmation | IPageObject>(page: new () => TPage): Promise<TPage>;
refresh<TPage>(page?: new () => TPage): Promise<any>;
setSize(width: number, height: number): Promise<void>;
switchBack(): Promise<void>;
switchToFrame(cssLocator: string): Promise<void>;
switchToMainWindow<TPage>(page?: new () => TPage): Promise<any>;
switchToWindow<TPage>(nameOrHandle: string, page?: new () => TPage): Promise<any>;
waitForElement(cssLocator: string): Promise<void>;
waitForTitle(title: RegExp): Promise<void>;
waitForURL(url: RegExp): Promise<void>;
waitForWindows(total: number, comparator?: Comparator): Promise<Array<string>>;
}