Forum Discussion

Tom_Test's avatar
Tom_Test
Contributor
9 years ago

Item.Name property

Hi,

 

I´m scripting tests in jscript. For ribbonbar icons i use FindChild and the WPFControlText property of the Icon. Problem: The text on the ribbonbar icons may change. Our DEV people suggested to use the name of the function behind the icon. In the opject spy i find it if i open the ‚item‘ object oft the icon. So i tried FindChild on Item.Name but it didn´t work. An Array using ClrClassName and Item.Name works fine.

 

Anyone with the same problem and a different solution?

 

Regards

Tom

  • baxatob's avatar
    baxatob
    Community Hero

    Hi,

     

    What did you mean: 


    FindChild on Item.Name

    Item.Name - is the property and it has no child. Or I am missing something?

    Give us the screenshot of the Icon from the object browser.

    • Tom_Test's avatar
      Tom_Test
      Contributor

      Hi baxatob,

       

      your right. I´m trying to find the ribbonbar icon as child of a window.

       

      Instead of WPFControlText "Text on the Icon" to identify the icon i try something like Item.Name "myfunction".

       

      Here its the refresh function with a german Text on the Icon.

      • baxatob's avatar
        baxatob
        Community Hero

        Ah, now I see. Item is a complicated property.

        So what happens if you use it like:

         

        icon = window.Find("Item.Name", "Refresh")

        ?