Personally, I steer clear of XPath... and here's why... finding something via XPath will return something... but that something might not be a UI object that can be operated on with the standard wrapper actions/methods from TestComplete. Our pal AlexKaras can give a better explanation.
The primary method (preferred and recommended) for object identification in TestComplete is via the NameMapping engine which builds an object hierarchy structure where objects are identified by a) what they are a child object of and b) a set of object properties used as identifciation criteria. So, your example would look, in the TestComplete programming, like
tristaanogre In UFT, the Object Spy would return the XPath to most objects. So for example, in your example, that .click on the LogOffButton would work well by just supplying the XPath property. I just tried Test Complete ObjSpy and it doesnt look like the XPath is something it can locate. I can see where it would not be a favorable method to use. Correct me if Im wrong in my findings regarding not being able to actually spy the XPath as Im relatively new to Test Complete.