Promise Me

In order to control a web browser from JavaScript, as Selenium WebDriverJs does, you need to deal with the fact that JavaScript is inherently non-blocking. Your code can tell the browser to retrieve a web page, but it’s hard to make it wait until that page comes back. We look at how Selenium uses promises to work around that problem.

comments powered by Disqus