package guitests.guihandles;

import static seedu.address.commons.util.AppUtil.checkArgument;

import javafx.scene.control.DialogPane;
import seedu.address.ui.UiManager;

/**
 * A handle for the AlertDialog of the UI
 */
public class AlertDialogHandle extends GuiHandle {

    public AlertDialogHandle(String dialogTitle) {
        super(dialogTitle);
    }

    public boolean isMatching(String headerMessage, String contentMessage) {
        checkArgument(intermediateStage.isPresent(), "Alert dialog is not present");
        DialogPane dialogPane = getNode("#" + UiManager.ALERT_DIALOG_PANE_FIELD_ID);
        boolean isMatching = dialogPane.getHeaderText().equals(headerMessage)
                && dialogPane.getContentText().equals(contentMessage);
        return isMatching;
    }
}

@@ -352,16 +352,481 @@
 %0A    %7D%0A%0A
+    private DialogPane getDialogPane() %7B%0A        return getNode(%22#%22 + UiManager.ALERT_DIALOG_PANE_FIELD_ID);%0A    %7D%0A%0A    /**%0A     * Returns the text of the header in the %7B@code AlertDialog%7D.%0A     */%0A    public String getHeaderText() %7B%0A        return getDialogPane().getHeaderText();%0A    %7D%0A%0A    /**%0A     * Returns the text of the content in the %7B@code AlertDialog%7D.%0A     */%0A    public String getContentText() %7B%0A        return getDialogPane().getContentText();%0A    %7D%0A%0A
     publ
@@ -983,93 +983,8 @@
 %22);%0A
-        DialogPane dialogPane = getNode(%22#%22 + UiManager.ALERT_DIALOG_PANE_FIELD_ID);%0A
     
@@ -1008,27 +1008,16 @@
 ching = 
-dialogPane.
 getHeade
@@ -1049,39 +1049,12 @@
 age)
-%0A                && dialogPane.
+ && 
 getC

Add getHeaderText() and getContentText()