1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | import * as q from 'q';
|
8 | import { promise as wdpromise, WebDriver } from 'selenium-webdriver';
|
9 | import { Config } from '../config';
|
10 | export declare abstract class DriverProvider {
|
11 | drivers_: WebDriver[];
|
12 | config_: Config;
|
13 | private bpRunner;
|
14 | constructor(config: Config);
|
15 | /**
|
16 | * Get all existing drivers.
|
17 | *
|
18 | * @public
|
19 | * @return array of webdriver instances
|
20 | */
|
21 | getExistingDrivers(): WebDriver[];
|
22 | getBPUrl(): string;
|
23 | /**
|
24 | * Create a new driver.
|
25 | *
|
26 | * @public
|
27 | * @return webdriver instance
|
28 | */
|
29 | getNewDriver(): WebDriver;
|
30 | /**
|
31 | * Quit a driver.
|
32 | *
|
33 | * @public
|
34 | * @param webdriver instance
|
35 | */
|
36 | quitDriver(driver: WebDriver): wdpromise.Promise<void>;
|
37 | /**
|
38 | * Quits an array of drivers and returns a q promise instead of a webdriver one
|
39 | *
|
40 | * @param drivers {webdriver.WebDriver[]} The webdriver instances
|
41 | */
|
42 | static quitDrivers(provider: DriverProvider, drivers: WebDriver[]): q.Promise<void>;
|
43 | |
44 |
|
45 |
|
46 |
|
47 | updateJob(update: any): q.Promise<any>;
|
48 | |
49 |
|
50 |
|
51 | setupEnv(): q.Promise<any>;
|
52 | |
53 |
|
54 |
|
55 |
|
56 | protected abstract setupDriverEnv(): q.Promise<any>;
|
57 | |
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 | teardownEnv(): q.Promise<any>;
|
65 | }
|