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.

how to enable the check boxes

edited November -1 in Sahi - Open Source
In your application in first page we have 10 check boxes and 2nd page we have 12 check boxes
for all the pages i have div class is same

div class="cuisine-options"

var $a=_collect("_link", "/./", _in(_div("cuisine-option")));

for (var $i=0; $i<$a.length; $i+=1) {
_click($a[$i]);

}

iam using this code

but is showing error ...

Comments

  • globalwormingglobalworming Moderators
    edited February 2012
    use _collect("_checkbox", "/./", _in(_div("cuisine-option")));

    Regards
    Wormi
  • now it is working
    it is selecting the all the check boxes

    i want to do one by one check and uncheck again

    iam using this code for select the check boxes

    var $a=_collect("_checkbox", "/./", _in(_div("cuisine-options")));

    for (var $i=0; $i<$a.length; $i+=1) {
    _click($a[$i]);
    }

    now i want to do one by one check and uncheck again
  • sandeep.. i beg you... you are making me kinda angry here. It is really no fun answering peoples questions which could be easyly solved by a minimum amount of initiative of one's own. Use the search function!
    http://sahi.co.in/w/?site=1&q=uncheck
    and RTFM! http://www.google.de/search?q=RTFM

    Regards
    Wormi
Sign In or Register to comment.