testbench icon indicating copy to clipboard operation
testbench copied to clipboard

getRow on GridElement throws NPE when row is not visible

Open simasch opened this issue 3 years ago • 1 comments

I have a test where I sort the grid. After sorting the row with index 0 is not visible.

When calling getRow(0) it throws an exception

java.lang.NullPointerException: Cannot invoke "com.vaadin.testbench.TestBenchElement.wrap(java.lang.Class)" 
because the return value of "com.vaadin.flow.component.grid.testbench.GridElement.executeScript(String, Object[])" is null

Please add some error handling that checks for this case and provide a meaningful error messte.

simasch avatar Jul 22 '22 08:07 simasch

Happened to me today; a more informative exception would certainly be appreciated.

GrandyB avatar Oct 18 '22 11:10 GrandyB