Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get text properties?
#1
Hi ankur,

I am recording an application where i want to read text properties like text color,font etc.
please help me

Regards
MAnoj
Reply
#2
You can use .Object.Currentstyle for any object to get the properties.
Try the code below-
Code:
Dim lnkobj SystemUtil.Run "C:\Program Files\Internet Explorer\IExplore.exe","http://www.google.co.in/" Set lnkobj =Browser("name:=Google").Page("title:=Google").Link("name:=Hindi").Object.currentStyle print "Link BackGround Color ="& lnkobj.backgroundColor print "Link font size ="& lnkobj.fontsize print "Link font family ="& lnkobj.fontfamily print "Link font color ="& lnkobj.color print "Link text alignment ="& lnkobj.textalign Set lnkobj=Nothing Browser("name:=Google").Close

Reply
#3
Hi Saket,

Thanks for providing nice example.
But this will not work for me ,i want to read normal text color (Which is not link) and that text appear on window within table(desktop application)

Regards
Manoj
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  text checkpoint properties error alp 0 1,518 11-24-2017, 04:36 PM
Last Post: alp
  Need to Validate Text filed is blank after clicking on the Text box balak89 3 5,919 09-13-2015, 12:06 AM
Last Post: ADITI1992
  I am trying to extract text from a webelement but it is generating blank text scenari excellentpawan 2 5,342 08-13-2013, 08:37 PM
Last Post: excellentpawan
  how to find a particular text in a text string pjavvaru 3 18,141 06-04-2010, 08:49 PM
Last Post: jsknight1969
  Retrieve text from Text Checkpoint Amit Singh Chauhan 1 2,889 08-20-2009, 07:15 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)