Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
2 years ago

How can I get font size from a object

There is a button that has "submit" text in it. I need to get the font size of this text "submit".  I am not able to find any relative property or method. Can anyone please help me with the same?
  • kaiiii's avatar
    2 years ago

    rraghvani Thanks...your suggested page help me

     

    Below is the code that works.

     

    Set page = Sys.Browser("edge").Page("*")

    Set foundObject= page.Find("idStr", "idValue", 100)
    Set style = page.contentDocument.defaultView.getComputedStyle(foundObject, "")
    Log.Message style.fontSize