diff --git a/tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py b/tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py index 964fce91759..34cf9201cb6 100644 --- a/tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py +++ b/tests/ert/ui_tests/gui/test_restart_ensemble_experiment.py @@ -72,10 +72,8 @@ def _evaluate(coeffs, x): run_experiment = experiment_panel.findChild(QWidget, name="run_experiment") qtbot.mouseClick(run_experiment, Qt.MouseButton.LeftButton) - # The Run dialog opens, wait until done appears, then click done - qtbot.waitUntil(lambda: gui.findChild(RunDialog) is not None) - run_dialog = gui.findChild(RunDialog) - + # The Run dialog opens, wait until restart appears and the tab is ready + run_dialog = wait_for_child(gui, qtbot, RunDialog) qtbot.waitUntil(run_dialog.restart_button.isVisible, timeout=60000) qtbot.waitUntil(lambda: run_dialog._tab_widget.currentWidget() is not None)