driverProvider.d.ts
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/// <reference types="selenium-webdriver" />
/// <reference types="q" />
/**
* This is a base driver provider class.
* It is responsible for setting up the account object, tearing
* it down, and setting up the driver correctly.
*/
import * as q from 'q';
import { WebDriver } from 'selenium-webdriver';
import { Config } from '../config';
export declare class DriverProvider {
drivers_: WebDriver[];
config_: Config;
constructor(config: Config);
/**
* Get all existing drivers.
*
* @public
* @return array of webdriver instances
*/
getExistingDrivers(): WebDriver[];
/**
* Create a new driver.
*
* @public
* @return webdriver instance
*/
getNewDriver(): WebDriver;
/**
* Quit a driver.
*
* @public
* @param webdriver instance
*/
quitDriver(driver: WebDriver): q.Promise<WebDriver>;
/**
* Default update job method.
* @return a promise
*/
updateJob(update: any): q.Promise<any>;
/**
* Default setup environment method.
* @return a promise
*/
setupEnv(): q.Promise<any>;
/**
* Teardown and destroy the environment and do any associated cleanup.
* Shuts down the drivers.
*
* @public
* @return {q.promise} A promise which will resolve when the environment
* is down.
*/
teardownEnv(): q.Promise<q.Promise<WebDriver>[]>;
}