Skip to content

Commit

Permalink
Fix example code on landing page (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
surma authored and Matt Gaunt committed Feb 23, 2017
1 parent c86bbe1 commit 8653df4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ on the current machine, filter out any browsers you may not want and
then get a web driver instance for that browser, this can be done like so:

```javascript
const selenium = require('selenium-webdriver');
const seleniumAssistant = require('selenium-assistant');

const browsers = seleniumAssistant.getLocalBrowsers();
Expand All @@ -53,12 +54,10 @@ browsers.forEach(browser => {
console.log(browsers.getPrettyName());

browser.getSeleniumDriver()
.then(webdriverInstance => {
return webdriverInstance.get('https://google.com/');
})
.then(() => {
return globalDriver.wait(selenium.until.titleIs('Google'), 1000);
});
.then(webdriverInstance =>
webdriverInstance.get('https://google.com/');
.then(_ => webdriverInstance.wait(selenium.until.titleIs('Google'), 1000);
);
});
```
Expand Down

0 comments on commit 8653df4

Please sign in to comment.