Forum Discussion
Hi,
Can you provide your text sample and the code you are using?
- Moulya_p7 years agoOccasional Contributor
The text is just a string with more than 50 characters. I am passing this string to the textbox using the Keys method. After adding this text, I am checking in the panel where it is displayed, whether the text is word wrapped ot not.
var str = "Any string which is more than 50 characters"
var textArea = obj.FindChild(["ObjectType", "className"], ["Textarea", "noteText"], 5);
textArea.Keys(str);
//Click on Add button to add the text
var textPanel = obj.FindChild("ObjectType", "className"], ["Panel", "card-text"], 5);
var bool = textPanel.WordWrap;
I am very new to TestComplete, so I don't know if my approach is right or not. I would really appreciate if you could provide me your inputs.
- tristaanogre7 years agoEsteemed Contributor
What is the error message you're getting?
- Moulya_p7 years agoOccasional Contributor
- baxatob7 years agoCommunity Hero
According to documentation the
WordWrap
property just specifies whether the multi-line component wraps its text to fit the component’s width.In your case you need to check that your input element has a MaxLength property == 50. That's enough as I think.
However you can addittionally obtain the result after the text was inputed and check it's length.
- Moulya_p7 years agoOccasional Contributor
I need to verify if the string which is given as an input is wrapping its text to fit the component's width. Here, I would be mainly checking the word wrapping feature. The text wraps when there are more number of characters, that is the reason I mentioned length as 50 earlier.
Related Content
- 4 years ago
- 4 years ago
- 3 years ago
- 5 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago