Q. Why is my test throwing WidgetNotFoundException when a nested dialog is closed?
A. When a button is clicked within the first dialog it opens another dialog. After closing the second dialog, the test stops and throws a WidgetNotFoundException. This happens because the first dialog does not get the focus back. Make sure when the second dialog is closed the focus goes back to the first dialog.
The above paragraph i got from FAQs. I am encountering the same problem. I want to know the solution.
I have tried to manually insert the code to bring focus to 1st dialog by clicking on the it after the 2nd dialog is closed. But still i get the same exception.
Please help! Thanks!