Can Test Complete 11 detect if a string is cut off?
I'd like to convince my superiors to purchase Test Complete 11. We use it for testing desktop applications. One thing that would really be useful is detecting if a string is cut off, like if the value for the object is "This is a test" but there is only room for "This is a te".
I know TC can check the value of an object and compare that against an expected value, but what would be really useful is if it could compare what is actually displayed agaisnt the expected value. It would eliminate a lot of tedious testing, especially when testing in foreign languages where it might not be as obvious when a string is cut off.
I did figure this out.
Log.Message T1.WndCaption
Set OCRObjWord = OCR.CreateObject(T1)
Set OCROptionsWord = OCRObjWord.CreateOptions
' Add font to the Options object.
Set FontItem = OCROptionsWord.Fonts.Add
' Specify the font name.
FontItem.Name = "Arial"
' Add the font size.
Call FontItem.Sizes.Add(10)
' Add the bold style.
Call FontItem.Styles.Add(1)
' Call the GetText function with the specified options.
Call Log.Message("Recognized word: " + OCRObjWord.GetText(OCROptionsWord))I can use the OCR to look at what is actually displayed and compare that to the field value is. If what is displayed is shorter, then the string is cut off.