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.
_sahi._typeKeyCodeNative(java.awt.event.KeyEvent.VK_ENTER) API not working
I am trying to playback following code:
_popup("Event Management")._highlight(_link("Activities List"));
_popup("Event Management")._click(_link("Activities List"));
_popup("Event Management")._closeWindow();
But while closing popup I am getting this annoying warnings by IE
"The webpage you are viewing is trying to close this window" and it directs to click YES or NO.
I am trying to click YES using keyboard ENTER event, as Sahi is not able to recognize this popup.
I need to automate the click "yes" or get rid of the warning.
I have gone through following link :
http://sahi.co.in/forums/discussion/comment/17843#Comment_17843
http://sahi.co.in/forums/discussion/6789/unable-to-simulate-entergo-on-the-ipad-using-_keypress#Item_11
and I came across this API:
_sahi._typeKeyCodeNative(java.awt.event.KeyEvent.VK_ENTER) and to include some functions in script which I did..
But its not working for me.
Does anyone have any idea to solve this issue
OS: Windows XP
Sahi: v3.5
IE: Version 8.0.6001.18702
_popup("Event Management")._highlight(_link("Activities List"));
_popup("Event Management")._click(_link("Activities List"));
_popup("Event Management")._closeWindow();
But while closing popup I am getting this annoying warnings by IE
"The webpage you are viewing is trying to close this window" and it directs to click YES or NO.
I am trying to click YES using keyboard ENTER event, as Sahi is not able to recognize this popup.
I need to automate the click "yes" or get rid of the warning.
I have gone through following link :
http://sahi.co.in/forums/discussion/comment/17843#Comment_17843
http://sahi.co.in/forums/discussion/6789/unable-to-simulate-entergo-on-the-ipad-using-_keypress#Item_11
and I came across this API:
_sahi._typeKeyCodeNative(java.awt.event.KeyEvent.VK_ENTER) and to include some functions in script which I did..
But its not working for me.
Does anyone have any idea to solve this issue
OS: Windows XP
Sahi: v3.5
IE: Version 8.0.6001.18702
Answers
_sahi._typeKeyCodeNative(java.awt.event.KeyEvent.VK_ENTER)
with the added functions that you mentioned with Sahi OS latest version i.e. 4.4.
Let me know if it still does't work for you.
Regards.