The current scenario is, i need to change the existing title with the new title and i am not able to trigger the keyboard's "Enter" key while automation. below is the program which i have written
var z = casper.evaluate(function triggerKeyDownEvent() {
jQuery(".jqtree-selected > div:nth-child(1) > span:nth-child(1)").text("HIHELLO");
this.wait(5000);
var e = jQuery.Event("keydown");
e.which = 13;
e.keyCode = 13;
jQuery("jqtree-selected > div:nth-child(1) > span:nth-child(1)").trigger(e);
return true;
});
I can see that the name is changing but it is failing to trigger Enter key.