18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
_keyPress() does not work for enter
Hello,
I'm trying toget my sahi script to press enter.
I have found the following solutions in the forums and documentation:
_keyPress(_textbox("__ac_name"), 13);
_keyPress(_textbox("__ac_name"), [13,13]);
Unfortunately the both don't work (and yes the textbox accessor is correct). What can I try instead?
OS: Windows XP
Browsers: Mozilla Firefox 6.0.2 and PhantomJS 1.1.0
Sahi Build: 2011-07-19
Regards,
Julian
I'm trying toget my sahi script to press enter.
I have found the following solutions in the forums and documentation:
_keyPress(_textbox("__ac_name"), 13);
_keyPress(_textbox("__ac_name"), [13,13]);
Unfortunately the both don't work (and yes the textbox accessor is correct). What can I try instead?
OS: Windows XP
Browsers: Mozilla Firefox 6.0.2 and PhantomJS 1.1.0
Sahi Build: 2011-07-19
Regards,
Julian
Comments
keypress 13 does not work if the element does not have an explicit keypress handler.
Here is an example :
Let me know if you face any problem
Regards
Sumitra
The textbox where I try to "press" enter is in a form element.
Most Browsers have a specific behaviour when you press enter in a form. I have changed this behaviour using a jQuery function. And I want to test if it works.
To be honest, I don't have any idea what an explicit keypress handler is, so I'm guessing, the element doesn't have one...
Could you please give me some pointer on how to proceed?
Thank you!
Regards,
Julian