Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Checkbox triggered enable/disable not working during test.

$
0
0

We have a page that enables some controls when a checkbox is checked.   Everything looks great when recording a test to validate that the controls are enabled, however when the test is run - the checkbox shows as checked - but the controls do not show as enabled.

 

Here's the javascript for enable/disable the controls:

<input name="_ctl0:ContentMain:tabGeneral:_hiddenPerformDetection" type="hidden" id="_ctl0_ContentMain_tabGeneral__hiddenPerformDetection" value="True" />
<script type="text/javascript">
    $(function () {        $('#_ctl0_ContentMain_tabGeneral__dataSourceIsActiveCheckBox').click(function () {            if (this.checked) {
                $('#_ctl0_ContentMain_tabGeneral__onUsDays').removeAttr('disabled');
                $('#_ctl0_ContentMain_tabGeneral__transitDays').removeAttr('disabled');
                $('#_ctl0_ContentMain_tabGeneral__defaultPriorityDropDown').removeAttr('disabled');
                $('#_ctl0_ContentMain_tabGeneral__imageSupportEnabledCheckBox').removeAttr('disabled');
                $('#_ctl0_ContentMain_tabGeneral__itemDetectionIsEnabledCheckBox').removeAttr('disabled');
                $('#_ctl0_ContentMain_tabGeneral__buttonsRow').removeAttr('disabled');            }
            else {
                $('#_ctl0_ContentMain_tabGeneral__onUsDays').attr('disabled', true);
                $('#_ctl0_ContentMain_tabGeneral__transitDays').attr('disabled', true);
                $('#_ctl0_ContentMain_tabGeneral__defaultPriorityDropDown').attr('disabled', true);
                $('#_ctl0_ContentMain_tabGeneral__imageSupportEnabledCheckBox').attr('disabled', true);
                $('#_ctl0_ContentMain_tabGeneral__itemDetectionIsEnabledCheckBox').attr('disabled', true);
                $('#_ctl0_ContentMain_tabGeneral__buttonsRow').attr('disabled', true);            }

 

Any help on getting this working would be appreciated.

 

Stuart.


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>