1. #1
    Ext User
    Join Date
    May 2008
    Posts
    6
    Vote Rating
    0
    denizstij is on a distinguished road

      0  

    Default Elements Id's of Items in Combox

    Elements Id's of Items in Combox


    Hi,

    We are using Selenium for testing our UI which is developed by ext-gwt(gxt). In selenium, each html elements must have a static id, in order to invoke a specific action on that element in a test case.

    We are able to set a static unique id almost all widget in ext-qwt but combox. It seems combobox widget has several subcomponents and items in a combobox is rendered on internal panel (called "list" in combobox class) of which id is set internally. I would like to set id of this panel (and also "view" DataView object's id). But i am not able to do that. As in the attachment, these two elements get "my-41" (container) and "my-42" (view) dynamically.

    Please note that, I am able to set the id of combobox (with setID(String) method) but not the id of these items and their internal container (list and view).

    Briefly, i need to set element id of "list" (Container) and "view" (DataView) objects (in other words, item's id) as if in "initList" method Combobox class.

    initList () {
    ...
    list.setId("list_static_id");
    view.setId("view_id");
    ...
    }


    Any idea ?

    Thanks in advance

    Deniz
    Attached Images

  2. #2
    Sencha User deanoj's Avatar
    Join Date
    Mar 2008
    Location
    Yorkshire, England.
    Posts
    183
    Vote Rating
    0
    deanoj is on a distinguished road

      0  

    Default


    Having never used GXT I can't be certain this will work.

    However I had the same problem with ExtJS. You're correct about the combo having child components been the issue. What I did was extend the ComboBox to explicitly set an ID for the 'inner' dropdown....

    Original:

    PHP Code:
    this.innerList this.list.createChild({cls:cls+'-inner'}); 
    Modified:

    PHP Code:
    this.innerList this.list.createChild({cls:cls+'-inner'idthis.innerId}); 
    Now i can use the 'innerId' config option when defining my customcombo, and selenium works fine.

    Hope this helps.

    Deano

  3. #3
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    I added "id={id}" to the default template. If your model object has an id, it will be substituted. Change is in SVN.

  4. #4
    Ext User janm's Avatar
    Join Date
    Mar 2010
    Location
    Cape Town
    Posts
    5
    Vote Rating
    0
    janm is on a distinguished road

      0  

    Default


    Hi, I'm fairly new to extjs and trying to do selenium testing on comboboxes.
    The proposed solution doesn't seem to work in extjs 3 (I'm assuming since the topic was started in 2008, the solution was proposed for extjs 2), unless I'm implementing it the wrong way.

    Code:
            var states = [
                ['AL', 'Alabama'],
                ['AK', 'Alaska'],
                ['AZ', 'Arizona'],
                ['AR', 'Arkansas']
            ];
    
            var store = new Ext.data.SimpleStore({
                fields: ['abbr', 'state'],
                data : states
            });
    
            combo_ext = Ext.extend(Ext.form.ComboBox, {
                constructor: function(config) {
                    Ext.apply(this, {
                        width: 200
                    });
                    combo_ext.superclass.constructor.apply(this, arguments);
                    this.innerList = this.list.createChild({cls:cls+'-inner', id: this.innerId});
                }
            });
    
            Ext.reg('extendedcomboxtype', combo_ext);
    Is there an alternative way to get the dropdown list's id via selenium or does it still need to be picked up on creation and then saved in the component itself?

    Thanks
    J

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."