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 Get text from readonly Checkbox

chaudharypareshchaudharyparesh Members
edited November -1 in Sahi - Open Source
OS=Linux
Browser=Firebox

On this link http://www.fortiguard.com/encyclopedia/application/100bao.html

i want to find text of checked checkbox . my problem is that it's readonly

Sahi controller also can't find checkbox


Any body know how To gettext ?

Comments

  • SumitraSumitra Members
    Hi chaudharyparesh,

    You can use the following code to get the text of checked checkbox.

    var $a = _getText(_div("sz540x200"));
    $a = $a.split("?");
    $a[3];
    _alert($a[3]);

    Let me know if this solves this issue.

    Regards
    Sumitra
  • Hey Sumitra


    From your logic i can find Text

    But i want find Text those checkbox are selected

    Like Go on http://www.fortiguard.com/encyclopedia/application/100bao.html

    Here i want to find Text

    Loss of productivity?
    Can bypass firewall policy?
    Can support file transfer?
    Can be misused?
    Can tunnel other apps?

    All above checkbox are selected

    How it's possible
  • SumitraSumitra Members
    Hi chaudharyparesh.

    You can use the following code:
    var $a = _getText(_div("sz540x200"));
    $a = $a.split("?");
    for(var $i=0; $i<8; $i++){
       if(_checkbox($i).checked){
           _alert($a[$i]);
       }
    }
    

    Regards
    Sumitra
  • Thanks u so much Sumitra
This discussion has been closed.