jbillings
15 years agoNew Contributor
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>
to:
<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.
<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>
to:
<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.