UNPKG

984 BPlain TextView Raw
1import {bind, provide, Provider} from 'angular2/src/core/di';
2import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
3import {Map} from 'angular2/src/facade/collection';
4
5/**
6 * A WebDriverAdapter bridges API differences between different WebDriver clients,
7 * e.g. JS vs Dart Async vs Dart Sync webdriver.
8 * Needs one implementation for every supported WebDriver client.
9 */
10export abstract class WebDriverAdapter {
11 static bindTo(delegateToken): Provider[] {
12 return [bind(WebDriverAdapter).toFactory((delegate) => delegate, [delegateToken])];
13 }
14
15 waitFor(callback: Function): Promise<any> { throw new BaseException('NYI'); }
16 executeScript(script: string): Promise<any> { throw new BaseException('NYI'); }
17 executeAsyncScript(script: string): Promise<any> { throw new BaseException('NYI'); }
18 capabilities(): Promise<Map<string, any>> { throw new BaseException('NYI'); }
19 logs(type: string): Promise<any[]> { throw new BaseException('NYI'); }
20}