Forum Discussion

Subbulakshmi's avatar
Subbulakshmi
Frequent Contributor
11 years ago

Font properties retrieval

Hi team,



I want to know whether we can retrieve font color/font size of an element displayed in Mobile application. 

2 Replies

  • Hi there, You may want to have a look at the android dev pages for support on this (and apple)...



    For example, the TextView object exposes 2 methods that you can use namely getCurrentTextColor and getTextSize 



    It's dependent on the object if it exposes the property and if it does... you can access it in TestComplete.



    Something like:

    //JScript


    var x = Aliases.Device.process.RootLayout.View("md__drawer").


                 Layout("md__menu").ScrollView("menu_scrollview").Layout("wonder", 2).


                 GridView("gridview").Layout("options_frame").Layout("llView").

                 TextView("options_label");  


      


      


      BuiltIn.ShowMessage(x.getCurrentTextColor());


      BuiltIn.ShowMessage(x.getTextSize());

  • AlexKaras's avatar
    AlexKaras
    Icon for Champion Level 2 rankChampion Level 2
    Hi,



    I think that this may depend on the OS platform (Android, iOS) and application type (Web or regular).