FireWatir is a testing framework based on WET and written for Firefox. This is what we currently use to test our mail application written to include dhtmlXGrid for the folder view.
My problem: I can’t find any way to identify a valid object which to ‘click’ in order to activate the row selection on the grid.
I identify HTML objects like this: obj=ff.element_by_xpath("//td[@title=‘sender_name’]") . Now, normally, in order to trigger the onClick event on the object I just identified, I’d just obj.click or obj.fire_event “onclick”. Unfortunately, this doesn’t work, and the complexity of dhtmlXGrid is not allowing me to dig any further to find my clickable object.
All suggestions are appreciated.
The next XPath can be used for locate cell in question ( it is untested, by must work )
row
obj=ff.element_by_xpath("//div[@className=‘objBox’]").rows[index+1];
where index is zero based index of row
cell
obj=ff.element_by_xpath("//div[@className=‘objBox’]").rows[index+1].cells[cell_index];
where index is zero based index of row
To simplify location you can enable HTML ID for grid cells
grid.enableCellIds(true);
after such command each cell in grid will have ID=“c_”+row_idd+"_"+column_index;