Add support for using wd’s promise API