vaadin / testbench

Vaadin TestBench is a tool for automated user interface testing of Vaadin applications.
https://vaadin.com/testbench
Other
20 stars 22 forks source link

getRow on GridElement throws NPE when row is not visible #1515

Open simasch opened 2 years ago

simasch commented 2 years ago

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.

GrandyB commented 1 year ago

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