We see cases where tables dynamically refresh on a page after selecting different filters or searching for items.
In these cases, the table has refreshed in the DOM but the table tree built by widgetastic is still cached in the Table instance. This means if you try to iterate over the rows of the table, if the number of rows has changed dynamically since the time the table tree was stored, the iterator won't correctly iterate on all the rows.
An example is:
Table has 1 row
User adjusts some "filter" on the page and now the table updates to have 3 rows.
[row.read() for row in table] will only read 1 row instead of 3 rows.
This PR changes the table_tree property to check if the selenium element ID of the table has changed, and if so, the table tree is re-generated.
We see cases where tables dynamically refresh on a page after selecting different filters or searching for items.
In these cases, the table has refreshed in the DOM but the table tree built by widgetastic is still cached in the Table instance. This means if you try to iterate over the rows of the table, if the number of rows has changed dynamically since the time the table tree was stored, the iterator won't correctly iterate on all the rows.
An example is:
[row.read() for row in table]
will only read 1 row instead of 3 rows.This PR changes the table_tree property to check if the selenium element ID of the table has changed, and if so, the table tree is re-generated.