diff --git a/docs/async-await.md b/docs/async-await.md index ed3b57a5d..ab5219dae 100644 --- a/docs/async-await.md +++ b/docs/async-await.md @@ -44,14 +44,14 @@ describe('angularjs homepage', function() { As you can see, the syntax is almost the same with TypeScript async/await. -1. We need wrap our asynchronous function with “async”. +1. We need to wrap our asynchronous function with “async”. 1. We can add “await” keyword to each operation that we want our program to wait for. **Note:** Never forget to add “await” keyword in an async function, it may bring some unexpected problem (e.g. your test might fail silently and always be reported as passed). -1. Don’t forget to turn off control_flow, you cannot use a mix of `async`/`await` and the control flow: +1. Don’t forget to turn off control flow, you cannot use a mix of `async`/`await` and the control flow: `async`/`await` causes the control flow to become unreliable (see [github issue]( https://github.com/SeleniumHQ/selenium/issues/3037)). So if you `async`/`await` anywhere in a spec, you should use the diff --git a/lib/selenium-webdriver/webdriver.js b/lib/selenium-webdriver/webdriver.js index c74cbb058..55ab55ec8 100644 --- a/lib/selenium-webdriver/webdriver.js +++ b/lib/selenium-webdriver/webdriver.js @@ -258,7 +258,7 @@ webdriver.WebDriver.prototype.call = function(fn, opt_scope, var_args) {}; * will cause Protractor to wait before sending future commands to the selenium * server), and only when the webdriver control flow is enabled. * - * This function returnes a promise, which can be used if you need to block + * This function returns a promise, which can be used if you need to block * javascript execution and not just the control flow. * * See also {@link ExpectedConditions}