I'm very new to this tool and have figured out quite a bit on my own or from posts here but I can't get this one feature to work.
I've tried a few approaches:
1. create two variables with the mode of Onscreen Object and point to the text I want to compare using the If...Then wizard to compare the two variables.
2. skip the variables and just use the IF...Then wizard and use the OnScreen Object to point to the two text areas to compare. I then use the If Else objects with logging attached and it always returns false.
FYI I decided to skip comparing two different pieces of text and went with comparing the same piece of text using the above methods and it still returns false.
Re: How to compare two pieces of text on a web page?
If you need to check whether the text of a web page element is equal to the expected text, you can use either Object or the Web Comparison checkpoint to do this (see the "About Checkpoints" help topic for more information). I am attaching a sample project suite which contains a similar test with Google. The test starts IE, opens the http://www.google.com page, types "Web" in the query edit box and checks whether the entered value is equal to the text of the text node located in the top left corner of the web page (the text is "Web"). Note that the test uses the "value" property to get the text from the text box and the "innerText" property to get the text from the text node. The difference is caused by the fact that the two controls are of different types, and therefore, different properties should be used to retrieve their text.
BTW, here is some information for those who are new to TestComplete:
First of all, I recommend that you see the "Getting Started" section of TestComplete's Help system. A printable version of this section (Getting Started With TestComplete 7.doc) is located in the "<TestComplete 7>\Help" folder.