mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
55 lines
874 B
TypeScript
55 lines
874 B
TypeScript
|
|
declare module scenario
|
|
{
|
|
interface ISleep
|
|
{
|
|
(timeSeconds: number): void;
|
|
}
|
|
|
|
interface IBrowser
|
|
{
|
|
(): IBrowser;
|
|
navigateTo(url: string);
|
|
navigateTo(url: string, delegate: (url: string) => string);
|
|
reload();
|
|
window(): IWindowApi;
|
|
location(): ILocationApi;
|
|
}
|
|
|
|
interface IWindowApi
|
|
{
|
|
href(): void;
|
|
path(): void;
|
|
search(): void;
|
|
hash(): void;
|
|
}
|
|
|
|
interface ILocationApi
|
|
{
|
|
url(): void;
|
|
path(): void;
|
|
search(): void;
|
|
hash(): void;
|
|
}
|
|
|
|
|
|
|
|
interface IElement
|
|
{
|
|
(): IElement;
|
|
(selector: string): IElement;
|
|
count(): number;
|
|
click(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
declare var browser: scenario.IBrowser;
|
|
declare var element: scenario.IElement;
|
|
declare var sleep: scenario.ISleep;
|
|
|