admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 402 forks source link

setText() requires callback while sendKeys() does not? #517

Open Ynhockey opened 6 years ago

Ynhockey commented 6 years ago

From what I can tell, sendKeys() and setText() are essentially the same functions, except sendKeys() just types text, while setText() replaces it. Both require a callback as the second parameter. However, it looks like sendKeys() works just fine with one parameter, while setText() doesn't, and returns:

Error: [element.setText("my_text")] Unexpected data in simpleCallback.

Am I missing something? I can't see anything in WD.js's code that would cause this, but maybe I just don't understand it well enough. Or it could be in one of the component libraries. In any case, any help is appreciated.