XQuery Question:
Download Questions PDF

The script recorded over the tested web page is not played back correctly. What is wrong?

Answer:

Most likely the script addresses web page elements by their index. TestComplete uses indexes if the element does not contain the Id or Name attribute (if any of these attributes are specified, TestComplete uses the attribute value to address the element). Using Id or Name is more reliable than using the indexes since the indexes can change from one test run to another. To work around the problem, use any of the following approaches: • In the source code of the tested web page, specify the Name or Id attribute for all controls that you need to work with from scripts. Upon doing this, you will be able to address the controls using the specified identifiers. • Use the Page(…).NativeWebObject.Find method to search for the desired control by values of its properties and attributes (innerText, innerHTML, href, src and so on).

Download XQuery Interview Questions And Answers PDF

Previous QuestionNext Question
I would like to add an HTML document to the Tested Applications collection. How can I do this?Does TestComplete support testing of Flex applications?