1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    12
    Vote Rating
    0
    bbalasateesh is on a distinguished road

      0  

    Default Unanswered: How to add IDs to Update and Cancel buttons in rowEditing

    Unanswered: How to add IDs to Update and Cancel buttons in rowEditing


    Hi,

    Ext-JS by default provides the dynamic ID to the elements rendered. I need to give an unique constant ID for Update and Cancel buttons in grid that are generated for rowEditing. Can anyone please let me know how to attach the IDs to Update and Cancel buttons.

    Thanks,
    Sateesh B.

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    568
    Answers
    58
    Vote Rating
    68
    ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice

      0  

    Default


    Why do you need this?

  3. #3
    Sencha User
    Join Date
    Aug 2013
    Posts
    12
    Vote Rating
    0
    bbalasateesh is on a distinguished road

      0  

    Default For automation tool

    For automation tool


    We need to provide the id to those buttons to use that in automation tool. The IDs got changed for each rendering. In automation testing we need to provide the ID which will not change. So if we can provide the IDs to that, they will be consistent to find in the automation testing.

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    568
    Answers
    58
    Vote Rating
    68
    ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice

      0  

    Default


    Instead try to obtain buttons' dynamic ids through executing javascript.
    Providing you can design a ComponentQuery for the grid:
    Code:
    Ext.ComponentQuery.query('<query for grid>')[0].editingPlugin.getEditor().getFloatingButtons().down('#update').id
    or (for Cancel):
    Code:
    Ext.ComponentQuery.query('<query for grid>')[0].editingPlugin.getEditor().getFloatingButtons().down(':not(#update)').id

  5. #5
    Sencha User
    Join Date
    Aug 2013
    Posts
    12
    Vote Rating
    0
    bbalasateesh is on a distinguished road

      0  

    Default


    We are using HP QTP, where we cannot use the component queries to get the id. In automation we will capture the flow and write the scripts with the IDs. If the id are changed dynamically, scripts will fail.

    Please let me know if we can provide ID or name to that buttons.

    Thanks,
    Sateesh B.

  6. #6
    Sencha User
    Join Date
    Sep 2011
    Posts
    568
    Answers
    58
    Vote Rating
    68
    ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice

      0  

    Default


    People say it is possible to execute javascript and get the result.
    I don't know a way to pass id's in config.

Thread Participants: 1

Tags for this Thread