@When("clicks the $button button")
    public void clicksButtonWithAlert(String button) throws InterruptedException {
        selenium.click("//*[.=" + button + "]");
        Thread.sleep(DraftAutoSaveSeleniumConstants.TWO_SECONDS);

        for (int second = 0;; second++) {
            if (second >= 60) {
                fail("timeout");
            }
            if (selenium.isAlertPresent()) {
                break;
            }
            Thread.sleep(DraftAutoSaveSeleniumConstants.ONE_SECOND);
        }
        saveMsg = selenium.getAlert();
    }