Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Simon Lee on Nov 10, 2008 03:50
open dhtmlx forum
In-place edit box Id

I am using the in-place editing feature of the dhtmlxgrid where the edit box appears in the cell. I wish to use automated testing with this so was wondering the best way to identify the edit box that is created (it currently has no Id assigned). With Selenium it currently has to find the element by traversing the table structure (tr/td/tr/ etc etc) which is not very flexible.

Would putting an Id value on the edit box that appears be possible? Or is there another workaround I can use to identify the box (so Selenium can type text into it)?

Thanks.
Answer posted by Support on Nov 10, 2008 07:07
>>Would putting an Id value on the edit box that appears be possible? 
The next must work 
grid.attachEvent("onEditCell",function(stage,id,ind){
    if (stage==1 && this.editor && this.editor.obj )
           this.editor.obj.id="some_id"
    return true; 
})

>>Or is there another workaround I can use to identify the box (so Selenium can type text into it)?
I'm not sure is latest version of Selenium supports css selectors. If it can, then input can be located as 
            .gridbox .editable input