adorable-analyst-45147
08/08/2022, 7:40 AMtablist. I want to do something like that to select a certain tab in my tab list on page B:
// Page A
cy.contains('a', 'Page B');
// Trying to find a button on the tablist from page B
cy.findByRole('tablist').contains('button', 'Submenu').click()
The thing is, the tested app doesn't start updating the DOM until it's got the response from the server (when switching to Page B).
As such, on the second line, Cypress will pick the tablist from Page A (which is still displayed when the command is executed), and then will try, for all the duration of the retry, the Submenu in THAT tablist. Even if in the meantime, Page B, with a tablist which actually contains that button, appears.
I wonder if there is a way to select something by re-evaluating the actual chain for the whole retry duration, or if I'm stuck? Or doing something wrong?