Forum Discussion

iamraj09's avatar
iamraj09
Contributor
9 years ago

Problem in using Text Recognition feature

Hello Everyone,

 

I am trying to click on an option called "File" from the menu bar, but the object spy is not detecting the option, I have tried to click on that using the Text Recognition feature. I have added the required class names in the Text Recognition window and saved the changes ...but Text Object in not displayed in the Object browser. Please let me know if this is the right way to implement.

 

Please refer the attachments for better understanding. Thanks in advance. 

 

Best Regards,

Guru Raja.

9 Replies

  • Use the point and fix from the object spy to highlight the container for the "File" menu. Then post the ClrClassName and ClrFullClassName properties here.

    • iamraj09's avatar
      iamraj09
      Contributor

      Hello Dewayne_Pinion,

       

      Thank you for the reply....that is where the problem is it will not focus on that particular Item. For that reason, I am trying to click on that option using character recognition method.

       

      Best Regards

      Guru

      • Dewayne_Pinion's avatar
        Dewayne_Pinion
        Contributor

        That is fine actually. Post the ClrClassName and ClrFullClassName properties for the menu bar highlighted in your screenshot

  • finae's avatar
    finae
    Contributor

    hi,

     

    most toolbar has an item list. this is Infragistic but i hope it helps:

     

    //get toolbar:

    // then

     

    set objTools = objToolBar.wItems.Item(0).Item("File").Items  

    // wItems.Item(0) is the first toolbar.. if you have a second toolbar wItems.Items(1) .. etc.

    //collection of options should exist in the objTools.

     

    for i=0 to objTools.Count-1
       if ucase(objTools.Item(i).text) =ucase("YourToolName") then 
             set obj = objTools.Item(i)
              obj.click
              exit for
        end if
    next

     

    //I think you can also do this:

    objToolBars.wItems.Item(0).Items.item("File").Items.Item("WhateverIsUnderFile").Click

    //or

     

    objToolBars.wItems.Item(0).Items.Item("File").Click

    //should click on teh 'file' menu tool button.

     

     

    These works for infragistic so I am not 100% it will work for you.

     

     

     

     

    • iamraj09's avatar
      iamraj09
      Contributor

      Thank you Finae, I will try this .... :smileyhappy: