mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Follow signatures to the recent doc
This commit is contained in:
@@ -714,9 +714,10 @@ function TestWebDriver() {
|
||||
var touchActions: webdriver.TouchSequence = driver.touchActions();
|
||||
|
||||
// call
|
||||
stringPromise = driver.call<string>(function(){});
|
||||
stringPromise = driver.call<string>(function(){ var d: any = this;}, driver);
|
||||
stringPromise = driver.call<string>(function(a: number){}, driver, 1);
|
||||
stringPromise = driver.call<string>(function(){ return 'value'; });
|
||||
stringPromise = driver.call<string>(function(){ return stringPromise; });
|
||||
stringPromise = driver.call<string>(function(){ var d: any = this; return 'value'; }, driver);
|
||||
stringPromise = driver.call<string>(function(a: number){ return 'value'; }, driver, 1);
|
||||
|
||||
voidPromise = driver.close();
|
||||
flow = driver.controlFlow();
|
||||
@@ -772,8 +773,12 @@ function TestWebDriver() {
|
||||
voidPromise = driver.sleep(123);
|
||||
stringPromise = driver.takeScreenshot();
|
||||
|
||||
booleanPromise = driver.wait(function() { return true; }, 123);
|
||||
booleanPromise = driver.wait(function() { return true; }, 123, 'Message');
|
||||
var booleanCondition: webdriver.until.Condition<boolean>;
|
||||
booleanPromise = driver.wait(booleanPromise);
|
||||
booleanPromise = driver.wait(booleanCondition);
|
||||
booleanPromise = driver.wait(function(driver: webdriver.WebDriver) { return true; });
|
||||
booleanPromise = driver.wait(booleanPromise, 123);
|
||||
booleanPromise = driver.wait(booleanPromise, 123, 'Message');
|
||||
|
||||
driver = webdriver.WebDriver.attachToSession(executor, 'ABC');
|
||||
driver = webdriver.WebDriver.createSession(executor, webdriver.Capabilities.android());
|
||||
|
||||
+3
-5
@@ -3922,8 +3922,7 @@ declare module webdriver {
|
||||
* scripts return value.
|
||||
* @template T
|
||||
*/
|
||||
executeAsyncScript<T>(script: string, ...var_args: any[]): webdriver.promise.Promise<T>;
|
||||
executeAsyncScript<T>(script: Function, ...var_args: any[]): webdriver.promise.Promise<T>;
|
||||
executeAsyncScript<T>(script: string|Function, ...var_args: any[]): webdriver.promise.Promise<T>;
|
||||
|
||||
/**
|
||||
* Schedules a command to execute a custom function.
|
||||
@@ -3935,7 +3934,7 @@ declare module webdriver {
|
||||
* with the function's result.
|
||||
* @template T
|
||||
*/
|
||||
call<T>(fn: Function, opt_scope?: any, ...var_args: any[]): webdriver.promise.Promise<T>;
|
||||
call<T>(fn: (...var_args: any[])=>(T|webdriver.promise.Promise<T>), opt_scope?: any, ...var_args: any[]): webdriver.promise.Promise<T>;
|
||||
|
||||
/**
|
||||
* Schedules a command to wait for a condition to hold. The condition may be
|
||||
@@ -3983,8 +3982,7 @@ declare module webdriver {
|
||||
* rejected if the condition times out.
|
||||
* @template T
|
||||
*/
|
||||
wait<T>(condition: webdriver.until.Condition<T>, timeout: number, opt_message?: string): webdriver.promise.Promise<T>;
|
||||
wait<T>(condition: (webdriver: WebDriver) => any, timeout: number, opt_message?: string): webdriver.promise.Promise<T>;
|
||||
wait<T>(condition: webdriver.promise.Promise<T>|webdriver.until.Condition<T>|((driver: WebDriver)=>T), timeout?: number, opt_message?: string): webdriver.promise.Promise<T>;
|
||||
|
||||
/**
|
||||
* Schedules a command to make the driver sleep for the given amount of time.
|
||||
|
||||
Reference in New Issue
Block a user