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.
Using _keyPress()
Hi,
Any idea how to use the key code directly in the function _keyPress() ?
i want to use keypress for "ENTER" and "ESCAPE" buttons.
Regards,
Pankaj.
Any idea how to use the key code directly in the function _keyPress() ?
i want to use keypress for "ENTER" and "ESCAPE" buttons.
Regards,
Pankaj.
Comments
I was thinking of using dispatchEvent but haven't had a chance to experiment with it yet. You want to play around with it and let me know what you come up with?
http://developer.mozilla.org/en/docs/DOM:element.dispatchEvent
Thanks for the input. I will definitely try this and will revert with the results i get.
Regards,
Pankaj.
Also tried using dispatchevent thing (but in vain) but am not much conversant with jscript.
Regards,
Pankaj.
Actually I am trying to press Escape after waiting for the page to load for a certain period.
the element that i pass to the _keyPress() function is top.document which is posing the problem, i suppose.
Regards,
pankaj.