All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.canoo.webtest.extension.dialogs.VerifyNoDialogs Maven / Gradle / Ivy

Go to download

Free open-source tool for automated testing of web applications.

The newest version!
// Copyright ? 2004-2005 ASERT. Released under the Canoo Webtest license.
package com.canoo.webtest.extension.dialogs;

import com.canoo.webtest.engine.StepFailedException;
import com.canoo.webtest.steps.Step;
import org.apache.log4j.Logger;

/**
 * Check that all expected dialogs have been 'consumed' by JavaScript.

* * @author Paul King * @webtest.step category="Extension" * name="verifyNoDialogs" * alias="verifyNoDialogResponses" * description="Used in conjunction with the and steps when dealing with javascript Dialog boxes. This step checks that all user responses expected were in fact \"consumed\" by javascript." */ public class VerifyNoDialogs extends Step { private static final Logger LOG = Logger.getLogger(VerifyNoDialogs.class); public void doExecute() { final int count = DialogHelper.getExpectedDialogsCount(getContext()); LOG.debug("Number of expected dialogs = " + count); if (count > 0) { throw new StepFailedException("Dialogs found but none expected!", this); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy