Skip to content

Commit b6ea941

Browse files
sjelinigniteram
authored andcommitted
chore(docs): cleaned up documentation for browser.wait (angular#3967)
The existing documentation was redundant and confusing. Closes angular#3679
1 parent f1f1eb7 commit b6ea941

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lib/selenium-webdriver/webdriver.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,16 @@ webdriver.WebDriver.prototype.executeAsyncScript = (script, var_args) => {};
250250
webdriver.WebDriver.prototype.call = function(fn, opt_scope, var_args) {};
251251

252252
/**
253-
* Schedules a command to wait for a condition to hold.
253+
* Schedules a command to wait for a condition to hold or {@link
254+
* webdriver.promise.Promise promise} to be resolved.
254255
*
255-
* This function may be used to block the command flow on the resolution
256-
* of a {@link webdriver.promise.Promise promise}. When given a promise, the
257-
* command will simply wait for its resolution before completing. A timeout may
258-
* be provided to fail the command if the promise does not resolve before the
259-
* timeout expires.
256+
* This function blocks WebDriver's control flow, not the javascript runtime.
257+
* It will only delay future webdriver commands from being executed (e.g. it
258+
* will cause Protractor to wait before sending future commands to the selenium
259+
* server), and only when the webdriver control flow is enabled.
260+
*
261+
* This function returnes a promise, which can be used if you need to block
262+
* javascript execution and not just the control flow.
260263
*
261264
* See also {@link ExpectedConditions}
262265
*

0 commit comments

Comments
 (0)