Contributions
Interacting with HTML DOM objects via javascript or Ajax in TC 14
I'm new to testcomplete. We have an area in our web app that is extremely difficult for testcomplete recorder to understand. We have a hidden ul that become un-hidden on a button click. Each list element has an input checkbox. I'm attempting to select all items in the list and check each item. The recorder is struggling so I thought we could just inject some javascript or ajax to make it happen. In our selenium/.NET C# solution I just executed some ajax like so:$("div[aria-checked*= 'false'] span.dx-checkbox-icon").click() I would like to execute something similar. Below is an example of the hidden ul. <ul class="dx-treeview-node-container" role="group"> <li class="dx-treeview-node dx-treeview-item-with-checkbox dx-treeview-node-is-leaf" data-item-id="0" role="treeitem" aria-label="Period Index" aria-expanded="true" aria-level="1" aria-selected="false"> <div role="checkbox" class="dx-checkbox dx-widget" aria-checked="false"> <input type="hidden" value="false"> <div class="dx-checkbox-container"> <span class="dx-checkbox-icon"></span> </div> </div> <div class="dx-item dx-treeview-item" aria-selected="false"> <div class="dx-item-content dx-treeview-item-content"> <span>Period Index</span> </div> </div> </li> <li class="dx-treeview-node dx-treeview-item-with-checkbox dx-treeview-node-is-leaf" data-item-id="1" role="treeitem" aria-label="Period Begin" aria-expanded="true" aria-level="1" aria-selected="false"> <div role="checkbox" class="dx-checkbox dx-widget" aria-checked="false"> <input type="hidden" value="false"> <div class="dx-checkbox-container"> <span class="dx-checkbox-icon"></span> </div> </div> <div class="dx-item dx-treeview-item" aria-selected="false"> <div class="dx-item-content dx-treeview-item-content"> <span>Period Begin</span> </div> </div> </li> </ul> There are about 45 items in the list. My goal is to add a short script snippet to a keyword test to set the inputs to 'checked'. Any help would be great. thanks!Solved1.4KViews0likes3Comments