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.4KViews0likes3CommentsTestComplete not waiting for page loads when api call done with different variables
Changes to a textbox on the page we are testing results in 2-4 api calls to the same url but with different variables /configure/ConfigureServlet?action=getFlatOptionStore¤tOrder=-140¤tItem=1.00 /configure/ConfigureServlet?action=updateSingleSegment&option=UOM /configure/ConfigureServlet?action=validateCfg¤tOrder=-140 /configure/ConfigureServlet?action=updateSingleSegment&option=WIDTH.OPT Listed above are only the beginning of the url's and not all of them. We enter text into the 1st textbox, tab to the next textbox and the api calls are made, when we get to the 3rd textbox the api calls from the 1st return and delete what we have in the 2nd textbox and our tests are unable to complete. We have been adding delays to our keyword tests but this has been hit/miss because some of our wait times for the api calls to finish can be 10 seconds. ThanksSolved2.7KViews0likes4Comments