Forum Discussion

jhgreen's avatar
jhgreen
Contributor
10 years ago

Testing for truncation

I am testing against a .net application. The problem is that I am trying to verify whether or not text within a box is truncated. TestComplete gives me the full text value so the test passes.



What options are available to verify truncation?

  • Hi Jeffrey,

     


    I cannot tell you for sure what property of the control you need to use. Try exploring the control in TestComplete's Object Browser to find it. Make sure that the Advanced View mode is activated in the Object Browser to see all properties and methods.


     

  • FYI,



    Here is the solution I found out was to create a function which would determine the width size based on the test string, font family and font size. Then I compare the width size calculated against the ActualWidth property and if the actual width property is less than width size calculated that would mean truncation has occurred
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Jeffrey,

     


    I cannot tell you for sure what property of the control you need to use. Try exploring the control in TestComplete's Object Browser to find it. Make sure that the Advanced View mode is activated in the Object Browser to see all properties and methods.