Forum Discussion
39 Replies
- sastoweSuper ContributorLog.Checkpoint. So
If sString1 = sString1 then
Log.Checkpoint "The strings are equal","" ,,,Sys.Desktop.Picture()
end if
Is that what you meant?- mcp111Contributor
Where to write this code?
Also in my desktop application, the error message is displayed in a tooltip when I hover over an exclamation mark icon.
I need to read that tooltip message and then log to an external file that the test has passed
How to do this?
- tristaanogreEsteemed Contributor
You're asking a lot of information in a simple question, mcp111. :)
So... to start with, the code is written in a Script unit. Read the following for writing script tests in TestComplete.
https://support.smartbear.com/testcomplete/docs/scripting/overview.htmlAs for the tooltip, I would use Object Spy to determine how the tool tip shows up. Sometimes the tooltip is its own object... sometimes it's a property of the object that has the tool tip assigned. So, you will need to first need to determine where the tool tip is. From that point, it's either code a HoverMouse action over the exclamation mark icon and do a property checkpoint on the tool tip object... OR, do a property checkpoint on the exclamation mark icon for the tool-tip property...
- chicksRegular ContributorThis is javascript but I'm sure you can do the equivalent....
CheckEquals( displayeRetailerId, expectedRetailerID, "retailerID" );
function CheckEquals(aValue1, aValue2, aDescription) {
// Log.Message ("one: "+aValue1 + " two: "+ aValue2);
if (aValue1 != aValue2) {
Log.Error(aDescription + " '" + aValue1 + "' does NOT match value '" + aValue2+"'");
Log.Message("string 1 in additional info.", aValue1);
}
else {
Log.Checkpoint(aDescription + " '" + aValue1 + " matches value '"+ aValue2+ "'");
}
}- cunderwCommunity Hero
mcp111 See my response in your other thread: https://community.smartbear.com/t5/TestComplete-General-Discussions/Can-anybody-explain-this-tooltip-script/m-p/168145#M31108
Related Content
- 5 years agoFlo