2015-07-09 17:32:42 -07:00
|
|
|
import {bind, Binding} from 'angular2/di';
|
2015-08-20 14:28:25 -07:00
|
|
|
import {Promise} from 'angular2/src/core/facade/async';
|
|
|
|
|
import {BaseException, ABSTRACT} from 'angular2/src/core/facade/lang';
|
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.
|
|
|
|
|
*/
|
|
|
|
|
@ABSTRACT()
|
|
|
|
|
export class WebDriverAdapter {
|
2015-07-09 17:32:42 -07:00
|
|
|
static bindTo(delegateToken): Binding[] {
|
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
|
|
|
}
|