Skip to main content
Solved

Question about verifyGridRecordCount() and hasNoRowsOverlay() in Testwise

  • July 14, 2026
  • 2 replies
  • 43 views

Forum|alt.badge.img

Hi,

I'm trying to understand the expected behavior of the following grid validation methods:

await grid.verifyGridRecordCount(expectedCount);
await grid.hasNoRowsOverlay();

I tested them on two different generated subjects/grids.

For verifyGridRecordCount():

  • getRowByIndex() and getCellValuesByColId() work correctly on the same generated grid.
  • However, verifyGridRecordCount() always times out after 10 seconds.
  • I tried different expected values (for example 1, 3, 6, and even the visible total count), but the result is always the same.

For hasNoRowsOverlay():

  • When the grid is empty, it correctly returns true.
  • After records are displayed in the grid, I expected it to return false (as described in the documentation), but instead it waits for the overlay locator and eventually times out.

Am I using these methods correctly, or are there any prerequisites or limitations for using them?

For reference, other generated grid methods on the same subject, such as getRowByIndex() and getCellValuesByColId(), work as expected.

Thanks!

Best answer by Poonam

Hi Erkan,

You're using them correctly per the docs, the limitation is on our side in how these two helpers work against the virtualized ag-Grid:

  • verifyGridRecordCount() counts the rows currently drawn on screen, not the total records. The grid only renders the rows you can see (more load as you scroll), and the header row also throws the count off so it rarely matches the value you pass, and it waits the full 10s and times out. That's why getRowByIndex() and getCellValuesByColId() work but this one doesn't.
  • hasNoRowsOverlay() only ever returns true . It waits for the "No result" message. On an empty grid that message exists, so it works. When the grid has records the message is gone, so instead of returning false it waits and times out.

What you can try instead:

For counting records, use the values from a column that's always filled:

const values = await grid.getCellValuesByColId('name'); // any always-present column
expect(values.length).toBe(6);

Or assert on a specific row you expect to exist:

await expect(grid.getRowByIndex(0)).toBeVisible();

For the empty case, keep using hasNoRowsOverlay() ,  it does that reliably:

expect(await grid.hasNoRowsOverlay()).toBe(true); // grid is empty

 

These are known limitations on our side. If the workarounds above don't cover your case, please raise a ticket so we can track fixing both methods properly.

Thanks!

2 replies

Poonam
Moderator
Forum|alt.badge.img+2
  • Moderator
  • Answer
  • July 14, 2026

Hi Erkan,

You're using them correctly per the docs, the limitation is on our side in how these two helpers work against the virtualized ag-Grid:

  • verifyGridRecordCount() counts the rows currently drawn on screen, not the total records. The grid only renders the rows you can see (more load as you scroll), and the header row also throws the count off so it rarely matches the value you pass, and it waits the full 10s and times out. That's why getRowByIndex() and getCellValuesByColId() work but this one doesn't.
  • hasNoRowsOverlay() only ever returns true . It waits for the "No result" message. On an empty grid that message exists, so it works. When the grid has records the message is gone, so instead of returning false it waits and times out.

What you can try instead:

For counting records, use the values from a column that's always filled:

const values = await grid.getCellValuesByColId('name'); // any always-present column
expect(values.length).toBe(6);

Or assert on a specific row you expect to exist:

await expect(grid.getRowByIndex(0)).toBeVisible();

For the empty case, keep using hasNoRowsOverlay() ,  it does that reliably:

expect(await grid.hasNoRowsOverlay()).toBe(true); // grid is empty

 

These are known limitations on our side. If the workarounds above don't cover your case, please raise a ticket so we can track fixing both methods properly.

Thanks!


Forum|alt.badge.img
  • Author
  • Apprentice
  • July 14, 2026

Hi ​@Poonam  Thanks for the explanation! That makes sense and matches what I was seeing. The suggested workarounds cover my current use case, so I'll use those for now. Thanks again!