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.
CTRL + Click checkbox
I have a control which is a table full of checkboxes and associated text.
To select multiple checkboxes I have to hold down the control key.
Is there a way to do this using Sahi.
Many thanks
Donna
To select multiple checkboxes I have to hold down the control key.
Is there a way to do this using Sahi.
Many thanks
Donna
Comments
Thank you.
Sahi allows you reach your checkboxes thanks to the accessor : _checkbox("table") (if table is the name of your checkbox)
Then you can check it by using _click() function
So, a checkbox can be checked by : Regards,
lepierrot
I need to hold down the control key and select multiple checkboxes. Simply having multiple _click(_checkbox("table")); will only select one item at once for me.
Many thanks for your help so far.
Donna
Maybe this will help you more :
_keyPress( element, character, COMBO_KEY )
_keyDown( element, character, COMBO_KEY )
It will simulate CTRL if you replace COMBO_KEY by "CTRL"
But I don't know how to simulate a click on it at the same time
Regards,
Pierre
I had found the keypress function, but cant find how to put the click with it too..
Thanks for your help.
Watch this space. I will post an answer as soon as I have it!!!!!
One with CTRL key pressed, and one with clicking on the checkbox ...
Ok, it's a little bit a "mac gyver" solution....
_click(_checkbox("ID")); NOT what it has now.
RR
RR
Has anyone found a solution as to how to emulate the holding down of ctrl while performing _click??
Sahi.prototype.activateHotKey = function () {
try {
this.addEvent(document, "dblclick", Sahi.openControllerWindow);
this.addEvent(document, "mousemove", this.mouseOver);
if (this.isSafariLike()) {
var prev = window.document.ondblclick;
window.document.ondblclick = function(e) {
if (prev != null) prev(e);
this.openControllerWindow(e)
};
}
} catch(ex) {
this.handleException(ex);
}
}
RR
Source: h t t p : //sahi.co.in/w/_click