Hi All,
I am working on nightwatch.js, i want to update existing data so i need to remove old date and need to set new data, i tried two way to get my result.
1) set empty text using following nightwatch function.
browser.setValue('.MyClass', 'text',' ');2) here i tried to use backspace but unfortunately nightwatch.js api documentation is not so good, so i tried following with the help of this link but not worked.
client.keys([client.Keys.COMMAND, "Backspace", client.Keys.NULL]);above code not pressed mouse backspace but append 'Backspace'.
If you have any best idea, please let me know. This question has already posted on Stackoverflow, i am sending a link following.
exports.command = function (browser, selector) { browser .getValue(selector, function(result){ for (c in result.value){ browser.setValue(selector, "\u0008") } }) return this;};