To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
I am using PhantomJS 2.1.1 to send the Enter keycode to a page on a client-side site built with VAADIN for testing. The page is never submitted. When I added the listener to output what the key code was, it showed 0 instead of 13
Am I doing something wrong?
console.log("key pressed was: "+ e.keyCode);});//SEND RETURN KEY TO PAGEvar ev = document.createEvent('KeyboardEvent');
ev.initKeyboardEvent( 'keydown',true,true, window,false,false,false,false,13,0);
The PhantomJS SendEvent doesn't work either on the page. It too returns 0
There is no form tag to .submit(). In a standard Firefox application using ScratchPad, I CAN use the dispatchEvent and it works fine.