Click method not accepted in chrome
I am trying to click buttons (accept icon, delete icon, etc., ) which are child elements of a grid cell but is not identified by object browser. However, I found access to them by using Xpath expression and passing Click command on them. This works fine on IE but throws exception on chrome (This method doesnt support the method or property).
My code is something like this:
Set grid = page.Find("className","k-widget k-grid*",1000)
Set cell = grid.Find(Array("RowIndex","ColumnIndex"),Array("0","3"),1000)
Set acceptbtn = cell.FindChildByXPath("//SPAN[@class='command icon-accept-inv']")
' OR
Set acceptbtn = cell.FindChildByXPath("//SPAN[@onclick='inlineGridEditor.saveItem(0)']")
Call acceptbtn.Click
html is something like this:
<td role="gridcell">
<span class="command icon-accept-inv" onclick="inlineGridEditor.saveItem(0)"></span>
<span class="command icon-cancel-inv" onclick="inlineGridEditor.cancelEditItem(0)"></span>
</span>
<span data-edit-off="" class="command icon-edit-inv" onclick="inlineGridEditor.editItem(0)" style="display: none;"></span><span data-delete="" class="command icon-del-inv" onclick="inlineGridEditor.deleteItem(0,"", urls.DeleteCallCategory)" style="display: none;"></span></td>
The button element is identified both in chrome and IE with the above script but Click action works only on IE.
Thanks
Hi,
I'm afraid, if the object browser is not recognizing the icons it will be hard click on them. Maybe you can clic on relative coords to the cell.
Are you sure that your icons are int the selected cell (0,3 ) instead of cel (0,2) ?
:(