Hi gsgowtam!
One of the most common methods to retrieve the text of an object is to the retrieve the 'contentText' of an object.
For instance, I can retrieve the text of our Login button on our SmartStore with the snippet below;
loginButtonText = Aliases.browser.Page("https://bearstore-testsite.smartbear.com/").FindElement("//span[.='Log in']").contentText;
Here is our document on the contentText Property;
https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/web-objects/contenttext-property-web-object.html
I hope this helps!