Forum Discussion

rdpatil's avatar
rdpatil
Occasional Contributor
7 years ago

How to toggle between the Angular JS checkbox from check to uncheck.

Team, I have to verify that the angular JS checkbox is checked or not & Take the action. (Check boxes in different rows) Need to parameterise it.

Its a toggle checkbox, not having is-checked Property to Verify it. The checkbox is inside the cell.

Tried by using the x-path, unable to select / un-select

Html code for checked checkbox =
<i class="btn fa fa-lg fa-check-circle-o" aria-hidden="true" ng-class='{" fa-check-circle-o": dataItem.Selected, "fa-circle-thin": !dataItem.Selected}' ng-click="vm.toogleSelection(dataItem)"></I>

 

Html code for un-checked checkbox =
<i class="btn fa fa-lg fa-circle-thin" aria-hidden="true" ng-class='{" fa-check-circle-o": dataItem.Selected, "fa-circle-thin": !dataItem.Selected}' ng-click="vm.toogleSelection(dataItem)"></I>

3 Replies

  • rdpatil's avatar
    rdpatil
    Occasional Contributor

    Currently we are using the Testcomplete 11. Is this issue is resolved in Higher Version?

    Can we upgrade directly from TestComplete 11 to Higher Version with same License or need a New one. 

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Alternatively, if it appears that your given control does not have special support from TestComplete, you will need to analyze the value of its .class property to check whether or not it contains 'fa-check' (checkbox is 'checked') and action correspondingly.

     

    P.S. And... Try to use TestComplete's Object Browser instead of Developer Tools. While they provide similar info, Object Browser displays data according to TestComplete's object cross-browser and coding representations, while Developer Tools display layout for the given browser and sometimes browser's layout may not match and work well for TestComplete.