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.
Automate recording of multiple events
Hi all,
First of all I want to thank all the team that developed Sahi for this really excellent tool.
Well, rather than posting multiple threads, I am going to collect issues I've faced in only one topic, hope this will get resolved
Sahi is intended in our case to be used by persons who have no (or very low) technical skills. That's why, when they will record tests, playback should work perfectly without modifying in scripts.
I will now briefly explain what parts of test have to be automated.
Issue1:
Is there a way to modify in Sahi Api to add a listener on keyboard key presses? We have in our application to press F2 on some TextBoxes (A menu with multiple items appear). As a programmer I was able to get it done by adding this line to the script:
I want this to get automatically appended to script each time I press F2 while recording, I think it's possible but don't know yet how to handle it..
Issue 2:
My application is GXT based, elements' IDs in the page are therefore highly dynamic. By default when recording, Sahi locates some page elements like this :
Of course it's possible to modify in the script and to add some _near , _in to get it always work fine, but it would be much better if I can tell Sahi to change the way he records by default (since it's open source), this way, I will not be obliged to modify manually each time in the script..
Issue 3:
Get Sahi automatically record right clicks without using the controller to tell that this element have to be right-clicked and then append the instruction to the script. That would be really great for me!
Issue 4:
Since Sahi is open source, which Java Classes will I have to see if i want to modify in the controller GUI. I want to add some extra-features to it.
Issue 5:
I have in my application combo-boxes that are GXT based. Suppose i have a combo box with two elements (True and False), when I click on the combo box itself, Sahi records this action; But when I choose True, this action is not recorded.
Hope this was not too long or boring
Many thanks in advance for all.
Sincerely,
mng.
OS: Windows
Browser: FF
Sahi v. 3.6 Pro - Trial: maybe we'll get the full version if we get convincing solutions
First of all I want to thank all the team that developed Sahi for this really excellent tool.
Well, rather than posting multiple threads, I am going to collect issues I've faced in only one topic, hope this will get resolved
Sahi is intended in our case to be used by persons who have no (or very low) technical skills. That's why, when they will record tests, playback should work perfectly without modifying in scripts.
I will now briefly explain what parts of test have to be automated.
Issue1:
Is there a way to modify in Sahi Api to add a listener on keyboard key presses? We have in our application to press F2 on some TextBoxes (A menu with multiple items appear). As a programmer I was able to get it done by adding this line to the script:
_keyPress(_textbox("Component_PAGE_FORM_0_counterpart"),[113,0]);
I want this to get automatically appended to script each time I press F2 while recording, I think it's possible but don't know yet how to handle it..
Issue 2:
My application is GXT based, elements' IDs in the page are therefore highly dynamic. By default when recording, Sahi locates some page elements like this :
_click(_image("x-auto-758"));
Of course it's possible to modify in the script and to add some _near , _in to get it always work fine, but it would be much better if I can tell Sahi to change the way he records by default (since it's open source), this way, I will not be obliged to modify manually each time in the script..
Issue 3:
Get Sahi automatically record right clicks without using the controller to tell that this element have to be right-clicked and then append the instruction to the script. That would be really great for me!
Issue 4:
Since Sahi is open source, which Java Classes will I have to see if i want to modify in the controller GUI. I want to add some extra-features to it.
Issue 5:
I have in my application combo-boxes that are GXT based. Suppose i have a combo box with two elements (True and False), when I click on the combo box itself, Sahi records this action; But when I choose True, this action is not recorded.
Hope this was not too long or boring
Sincerely,
mng.
OS: Windows
Browser: FF
Sahi v. 3.6 Pro - Trial: maybe we'll get the full version if we get convincing solutions
This discussion has been closed.
Comments
Thanks for the appreciation.
Issue 1: F2: we should be able to trap F2 and record it. Currently we do not capture generic keypresses on the full window (like F2), but it is possible
Issue 2: Open sahi/userdata/config/userdata.properties and add Restart Sahi and Sahi will stop identifying elements by x-auto and use some other alternative identifier instead.
Issue 3: This is possible. We will be fixing this in the coming build.
Issue 4: Look for sahi/htdocs/spr/controller7.htm and controller7.js The communication happens via ControllerUI.java
Issue 5: If you can point to an example we can verify and fix this.
Regards,
Narayan
Thanks for the reply. Now I followed your suggestions for Issue2 and it's changing the locator as expected. What I understood is that these are regular expressions that Sahi ignores when recording a script, so I wanted to also ignore another Locator which is in my case for example:
in userdata.properties I added this:
But Sahi is still recording using that locator, which doesn't fit me because it doesn't work on playback.
For issue 5, you can try record a scenario from this site: 3w.sencha.com/examples/pages/forms/combos.html
You'll notice that when you choose a state (for example : Colorado), the selection is not recorded by Sahi, that's exactly what I'm facing in my application.
Many thanks again, hoping you get me a solution for both right-click handling and F2 click. That would be awesome.
Best regards,
mng.
Change
|^x[-]nodrag
to
|x[-]nodrag
and check.
Regards,
Narayan
Now I'm trying to change in the API to add F2 automatic record support & the capture of the mouse right-click, too.
Stay in touch, I'll let you know if there is something new.
Thanks again
Regards,
mng.