WebPagetest Forums
Script containing sendKeyPress (ENTER button) - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: Script containing sendKeyPress (ENTER button) (/showthread.php?tid=12713)

Script containing sendKeyPress (ENTER button) - sivicencio - 12-08-2013 01:31 PM


I'm having problems with a script I'm writing and trying to execute. This script fills an input field (had to use exec scripting function for context-specific issues) and then tries to press ENTER to do something else. Here's the script:

navigate http://todomvc.com/architecture-examples/emberjs/
exec document.getElementById('new-todo').value='Example task'
sendClick id=new-todo
sendKeyPressAndWait id=new-todo ENTER

The thing is it doesn't perform the ENTER keypress event and I can't figure out why.

Any thoughts? Thank you.