It's taking a long time to enter over 300 characters using nightwatch's setValue function since it keys in each character individually. I attempted to use the .execute function to inject custom JavaScript onto the page, and while the value is successfully set, the focus remains on the text box. How can I shift the focus away so that I can proceed?
The application is built with reactjs.
Here's an example of the code:
browser.execute(function(elementId){
document.getElementById('elementId').value = 'characters .............'
},[],function(result) {
console.log("element is set");
});
browser.click('.elementID-1')