Forum Discussion

kavansays's avatar
kavansays
Contributor
9 years ago

NameMapping problem for Same Name different property objects

Hi All,

Facing NameMapping problem for handling Same Name different property objects.

 

My Application have Multiple tabs with same name tablesviews with different indexes.

 

One.jpg

 

I would like to save only one generic Table View as remaining objects are same only difference is the Index.

 

Is there any way to use same tableview for all the other tableviews just by updating Index property runtime as required?

 

Thanks in Advance..

Kavan Shah

3 Replies

  • TO Change the Runtime index property of the object i tried below code but no luck..

     

    ------------------------------------------------

    Set oTabPane = Aliases.javaw.starterMystageIndmsDevApplicatio.scene.primaryTabPane

     

    Set app = Aliases.javaw.starterMystageIndmsDevApplicatio.scene.primaryTabPane.todayTabPane.uiTableView
    prop = "JavaFXObjectIndex"

    ' Checks whether the desired property is supported
    If aqObject.IsSupported(app, prop) Then
        Call aqObject.SetPropertyValue(app, prop, 1)
    Else
        Log.Error "The specified property is not supported by the object."
    End If
    -----------------

     

    To check if the code is working fine i am fetching the rowcount before changing row index and after changing the index.

     

    Before value :98 

    After Value Expected : 2

    Actual After value : 98

    Conclusion: No change in object property.

     

     

    • cunderw's avatar
      cunderw
      Community Hero

      Just remove the index as an identification properties for the alias you want to keep, then remove all of the other alias. 

      • kavansays's avatar
        kavansays
        Contributor

        @ Cundrew Hi,

        Thanks for your reply, here the problem is once i remove index as a indetification property, it does not identify the object in the application.

         

        thats why i am trying to change the property runtime to match the required object, but no luck.

         

        Actually i am looking to use SETROProperty(Supported in QTP) type method to change runtime object property.