How to handle modal dialog in pytest-qt without mocking the dialog
问题 I am using pytest-qt to automate the testing of a PyQt GUI. The dialogs need to be handled as a part of the testing(dialogs should not be mocked). For example, file dialog that comes after a button-click has to be handled. There are 2 problems After the button click command, the program control goes to the event handler and not to the next line where I can try to send mouseclick/keystrokes to the dialog. Since the QDialog is not added to the main widget, it is not being listed among the