2015-10-10 22:11:13 -07:00
|
|
|
import {bind, provide, Provider} from 'angular2/src/core/di';
|
2015-08-20 14:28:25 -07:00
|
|
|
import {Promise} from 'angular2/src/core/facade/async';
|
2015-09-10 15:25:36 -07:00
|
|
|
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
|
2015-08-28 11:29:19 -07:00
|
|
|
import {Map} from 'angular2/src/core/facade/collection';
|
2015-05-27 14:57:54 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A WebDriverAdapter bridges API differences between different WebDriver clients,
|
|
|
|
|
* e.g. JS vs Dart Async vs Dart Sync webdriver.
|
|
|
|
|
* Needs one implementation for every supported WebDriver client.
|
|
|
|
|
*/
|
2015-09-25 14:48:17 -07:00
|
|
|
export abstract class WebDriverAdapter {
|
2015-10-10 22:11:13 -07:00
|
|
|
static bindTo(delegateToken): Provider[] {
|
2015-05-27 14:57:54 -07:00
|
|
|
return [bind(WebDriverAdapter).toFactory((delegate) => delegate, [delegateToken])];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
waitFor(callback: Function): Promise<any> { throw new BaseException('NYI'); }
|
|
|
|
|
executeScript(script: string): Promise<any> { throw new BaseException('NYI'); }
|
2015-06-08 13:51:10 -07:00
|
|
|
executeAsyncScript(script: string): Promise<any> { throw new BaseException('NYI'); }
|
2015-05-27 14:57:54 -07:00
|
|
|
capabilities(): Promise<Map<string, any>> { throw new BaseException('NYI'); }
|
2015-08-28 11:29:19 -07:00
|
|
|
logs(type: string): Promise<any[]> { throw new BaseException('NYI'); }
|
2015-05-27 14:57:54 -07:00
|
|
|
}
|