Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.

Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com

how to _check a checkbox inside a label?

sathyendrasathyendra Members
edited July 2013 in Sahi - Open Source
I have checkbox inside the label as below.

<div class="fields1 ">
<label><input type="checkbox" class="roleclass" value="10" id="rolesCheck-10" name="rolesCheck[]">Roles Admin</label><br><label><input type="checkbox" class="roleclass" checked="checked" value="5" id="rolesCheck-5" name="rolesCheck[]">SCM Admin</label><br><label><input type="checkbox" class="roleclass" value="11" id="rolesCheck-11" name="rolesCheck[]">User Admin</label><br><label><input type="checkbox" class="roleclass" value="9" id="rolesCheck-9" name="rolesCheck[]">User Authentication / Access</label><br><label><input type="checkbox" class="roleclass" value="12" id="rolesCheck-12" name="rolesCheck[]">SCM Guest</label><br><label><input type="checkbox" class="roleclass" value="32" id="rolesCheck-32" name="rolesCheck[]">satTestMail</label><br><label><input type="checkbox" class="roleclass" value="14" id="rolesCheck-14" name="rolesCheck[]">SVN Guest</label><br><label><input type="checkbox" class="roleclass" value="18" id="rolesCheck-18" name="rolesCheck[]">Admin</label></div>

i tried to use _check(_checkbox({className:"roleclass"},_in(_label("Admin")))); but not able to check/enable the checkbox.


How can i do this?

Answers

  • Hi sathyendra,
    What version of Sahi OS are you using?
    The script statement you'e written is correct and it works for Sahi OS version 4.4 i.e the latest released Sahi version.

    Regards.
Sign In or Register to comment.