18 January 2026:


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.

checkboxes, radiobuttons and sahi

tower120tower120 Members
edited November -1 in Sahi - Open Source
Hi!

I found that when do _check, _uncheck, _click on checkboxes and radiobuttons they do not appear selected/checked. All this functions call _click, so I made this hack to fix this:
Sahi.prototype._click = function (el, combo) {
    this.debug += " ; _click begin.\n";
    this.checkNull(el, "_click");
    this.checkVisible(el);

    //!!!!HACK!!!!
    if (this._isChrome() &&
        ((el.type == 'checkbox') ||
        (el.type == 'radio'))
        ){
        el.checked = !el.checked; 
    }

    this.simulateClick(el, false, false, combo);
    this.debug += " ; _click ended.\n";
};

Hope, this help someone. This is inside concat.js. I don't know what about concat3.js and concat7.js

Comments

Sign In or Register to comment.