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.
_check(_checkbox) is not working on chrome
Hi Narayan
I have tried following code..
_check(_checkbox("ShowSubLanes"));
This line execute without any error
but checkbox not get checked on chrome browser
Same line execute fine on firefox browser
Regards
gkadam
I have tried following code..
_check(_checkbox("ShowSubLanes"));
This line execute without any error
but checkbox not get checked on chrome browser
Same line execute fine on firefox browser
Regards
gkadam
Comments
Aditee
(Digite Infotech)
_check(_checkbox("checkboxName"));
works fine on the Chrome browser(7.0.517.41) on the Sahi Build: 2010-06-11.
Let us know which version of Chrome browser and which version of Sahi Build you are using.
Google Chrome Browser - 8.0.552.18
Sahi - 2010-10-04
Regards,
Aditee
(Digite Infotech)
1. Chrome - 8.0.552.18
Sahi - 2010-06-11
2. Chrome - 8.0.552.18
Sahi - 2010-10-04
code -
_call(_sahi.simulateMouseEvent(_checkbox("checboxName"), "click"));
but _check does not work for the same
Regards,
Aditee
(Digite Infotech)
Regards,
Narayan
We have make some change sahi code
"Sahi.prototype.simulateClick = function (el, isRight, isDouble, combo) {
var n = el;
var link = this.getEncapsulatingLink(n);
if (link != null){
link.__sahi__prevClick = link.onclick;
var elWin = this.getWindow(link);
link.onclick = function (e) {
// test with docWriteIFrame
return _sahi.wrap(_sahi.linkClick)(e ? e : elWin.event);
};
}
this.simulateMouseEvent(el, "mousemove");
this.simulateMouseEvent(el, "mouseover");
this.simulateMouseEvent(el, "mousedown", isRight, false, combo);
this.invokeLastBlur();
this.simulateMouseEvent(el, "focus");
this.simulateMouseEvent(el, "mouseup", isRight, false, combo);
if (isRight) {
if (window.opera){
this.simulateMouseEvent(el, "click", isRight, isDouble, combo);
}else{
this.simulateMouseEvent(el, "contextmenu", isRight, isDouble, combo);
}
} else {
try {
if (this._isIE() && !isDouble && el && (this.areTagNamesEqual(el.tagName, "LABEL") ||
(el.type && (el.type == "submit"
|| el.type == "reset" || el.type == "image"
|| el.type == "checkbox" || el.type == "radio")))) {
el.click();
} else {
if (window.opera && !isDouble){
// for opera single clicks don't simulate click event;
}
else {
if (this.isSafariLike()) {
if (this.areTagNamesEqual(el.tagName, "INPUT")) {
if (typeof el.checked == "boolean") {
el.checked = (el.type == "radio") ? true : !el.checked;
_sahi.simulateMouseEvent(el, "change");
}
}
}
// change made here else{
this.simulateMouseEvent(el, "click", isRight, isDouble, combo);
}
}
}
} catch(e) {
}
}
if (!this.isSafariLike()){
this.setLastBlurFn(function(){
try{
_sahi.simulateMouseEvent(el, "mousemove");
_sahi.simulateMouseEvent(el, "mouseout");
if (!_sahi._isFF() && (el.type == "checkbox" || el.type == "radio")){
_sahi.simulateMouseEvent(el, "change");
}
_sahi.simulateMouseEvent(el, "blur");
}catch(e){}
});
}
if (link){
link.onclick = link.__sahi__prevClick;
}
};
"
i guess there was else statement missing at following
if (this.isSafariLike()) {}
this.simulateMouseEvent(el, "click", isRight, isDouble, combo);
After code change we are able to check/uncheck checkbox on chrome and Firefox.
But we are still facing problem in IE version 8
so could you please help us out..
_check is actually working on the 3rd Nov build. You can verify on this page
http://sahi.co.in/demo/formTest.htm
Let us do a desktop share session to see what is happening in your case.
Unless you understand exactly how the events are generated and what the sequence is, I would suggest, don't modify those functions in concat.js
Regards,
Narayan
Even _click and highlight is not working for checkboxes (also tested formTest.htm-URL (can not post urls) from narayan with Sahi Controller).
Version of Sahi: Build : 2010-11-03
Version : V3
Build : 2010-11-03
UserAgent : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13
Name : Safari
Version : 5.0 (Windows; U; Windows NT 5.1; en-US)
i'm facing the same problem in a new script i'm recording, but in a different script it works fine; the script is the one i post in here http://sahi.co.in/forums/viewtopic.php?id=2087
Confirmed that this bug exists with the latest release of Chrome and has been fixed and will be available in the next release, to be made in a day or two.
i just installed the V3.5 and faced the same problems. On firefox, everything works well, but on chromium-browser, checking or clicking of radio buttons isn't possible.
I'm using the latest Sahi version and Chromium 8.0.552.237 Ubuntu 10.04
http://sahi.co.in/forums/viewtopic.php?id=2196
http://sahi.co.in/forums/viewtopic.php?id=1907
I also tried testing on this page : http://sahi.co.in/demo/formTest.htm
It does not work with latest version of Sahi OS [v35] and Chrome.
Altough It does recognizes checkbox by id, name, class in record window; It fails to play the recorded syntax.
I tried using
_click(_checkbox("agreeCheckbox"));
_check(_checkbox("agreeCheckbox"));
_click(_check("agreeCheckbox"));
_check("agreeCheckbox");
All FAILS.
Someone needs to log this as a defect.
Hopefully this is will be available in next version of Sahi OS.
Found some workaround for this issue,
For now you can try using:
_checkbox("agreeCheckbox").click()
This Works.