Make mongoose queries in the selenium-webdriver control flow.