Forum Discussion

jbillings's avatar
New Contributor
14 years ago

Issues with checkpoints and innerHTML/outerHTML in TC8

I am having issues with creating checkpoints. When I create a property checkpoint, TC8 is editing the HTML in a way that will always fail. When created, a button will return this as the outerHTML:

<BUTTON onclick=loadTest() type=submit>Start Test</BUTTON>

The problem arises when the script is run right afterwords, TC8 is comparing that to the actual HTML which is:

<button onclick="loadTest()">Start Test</button>

This test will always fail. TC8 seems to be adding "type=submit", deleting the quotation marks, and changing the case of the tags. Also, if the HTML being checked is on two or more lines, TC8 is creating a checkpoint that is only one line which always fails. When checking properties in the Object Browser, the results are the same. TC8 is editing the properties and never match the actual content. This problem is significantly adding to test creation time because I have to manually go in and change the checkpoints. For the example above, I have to change:

<BUTTON onclick=loadTest() type=submit>Start Test</BUTTON>


<button onclick=\"loadTest()\">Start Test</button>

This change makes the checkpoint pass which means while the test is running, it is returning the proper values for properties which is different from what the checkpoint creation tools are returning.

2 Replies

  • jbillings's avatar
    New Contributor
    Another example which really shows why its causing creation time to go way up.

    Checkpoint created by TC8:

    aqObject.CheckProperty(page["DIV"]["Item"]("assignment_detail"), "innerHTML", cmpContains, "<DIV class=assignmentHeader>\r\n<DIV style=\"MIN-HEIGHT: 6em\"><SPAN class=assignmentTitle>Automated Swappable Assignment Description </SPAN></DIV></DIV>", false);

    The way it has to be formated to get passing result:

    aqObject.CheckProperty(page["DIV"]["Item"]("assignment_detail"), "innerHTML", cmpContains, "<div class=\"assignmentHeader\">", false);

    aqObject.CheckProperty(page["DIV"]["Item"]("assignment_detail"), "innerHTML", cmpContains, "<div style=\"min-height: 6em;\">", false);

    aqObject.CheckProperty(page["DIV"]["Item"]("assignment_detail"), "innerHTML", cmpContains, "<span class=\"assignmentTitle\">", false);

    aqObject.CheckProperty(page["DIV"]["Item"]("assignment_detail"), "innerHTML", cmpContains, "Automated Swappable Assignment Description", false);

    Actual HTML on page:

    <div class="assignmentHeader">

        <div style="min-height: 6em;">

            <span class="assignmentTitle">


                    Automated Swappable Assignment Description




  • jbillings's avatar
    New Contributor
    To update:

    After some more investigating, I figured out that the problem is being caused from testing IE and FF in the same test. In TC7, you could create a check for one and it would work in both browsers. As of TC8, when IE is the browser, TC8 is editing the properties while with FF you get the true value of properties.