I want to validate that field is not editable. Code I am trying is:
driver.findElement(By.xpath("//div[@comp-id='1494']")).click();
driver.findElement(By.xpath("//div[@comp-id='1494']")).sendKeys("PleaseCHECK");
But this is not working as it successfully pass this and according to my TC this is incorrect
div of above element (which is not editable) looks like:
<div tabindex="-1" role="gridcell" comp-id="1534" col-id="FGA_PROCESSOR" class="ag-cell ag-cell-not-inline-editing ag-cell-with-height ag-cell-value ag-cell-no-focus" style="width: 97px; left: 1864px; "></div>
div of editable field looks like:
<div tabindex="-1" role="gridcell" comp-id="1532" col-id="fgaConfigDescription" class="ag-cell ag-cell-with-height ag-cell-value ag-cell-focus ag-cell-inline-editing ag-column-hover" style="width: 175px; left: 1581px; "><input class="ag-cell-edit-input" type="text"></div>
Only difference between editable and non editable fields is on INPUT tag.
I just need to make sure that the field is not editable and doesn't accept any text/data