use of com.testsigma.automator.exceptions.AutomatorException in project testsigma by testsigmahq.
the class WaitUntilElementIsDisabledAction method execute.
@Override
public void execute() throws Exception {
try {
boolean elementDisabled = getWebDriverWait().until(CustomExpectedConditions.elementIsDisabled(getBy()));
Assert.isTrue(elementDisabled, String.format(FAILURE_MESSAGE, getFindByType(), getLocatorValue(), getTimeout()));
setSuccessMessage(SUCCESS_MESSAGE);
} catch (TimeoutException e) {
throw new AutomatorException(String.format(FAILURE_MESSAGE, getFindByType(), getLocatorValue(), getTimeout()), (Exception) e.getCause());
}
}
use of com.testsigma.automator.exceptions.AutomatorException in project testsigma by testsigmahq.
the class WaitUntilElementIsEnabledAction method execute.
@Override
public void execute() throws Exception {
try {
boolean elementDisabled = getWebDriverWait().until(CustomExpectedConditions.elementIsEnabled(getBy()));
Assert.isTrue(elementDisabled, String.format(FAILURE_MESSAGE, getFindByType(), getLocatorValue(), getTimeout()));
setSuccessMessage(SUCCESS_MESSAGE);
} catch (TimeoutException e) {
throw new AutomatorException(String.format(FAILURE_MESSAGE, getFindByType(), getLocatorValue(), getTimeout()), (Exception) e.getCause());
}
}
use of com.testsigma.automator.exceptions.AutomatorException in project testsigma by testsigmahq.
the class WaitUntilElementIsSelectedAction method execute.
@Override
public void execute() throws Exception {
try {
boolean elementNotSelected = getWebDriverWait().until(ExpectedConditions.elementToBeSelected(getBy()));
Assert.isTrue(elementNotSelected, String.format(FAILURE_MESSAGE, getFindByType(), getLocatorValue(), getTimeout()));
setSuccessMessage(SUCCESS_MESSAGE);
} catch (TimeoutException e) {
throw new AutomatorException(String.format(FAILURE_MESSAGE, getFindByType(), getLocatorValue(), getTimeout()), (Exception) e.getCause());
}
}
use of com.testsigma.automator.exceptions.AutomatorException in project testsigma by testsigmahq.
the class WaitUntilElementIsVisibleAction method execute.
@Override
public void execute() throws Exception {
try {
WebElement visibleElement = getWebDriverWait().until(ExpectedConditions.visibilityOfElementLocated(getBy()));
Assert.notNull(visibleElement, String.format(FAILURE_MESSAGE, getFindByType(), getLocatorValue(), getTimeout()));
setSuccessMessage(SUCCESS_MESSAGE);
} catch (TimeoutException e) {
throw new AutomatorException(String.format(FAILURE_MESSAGE, getFindByType(), getLocatorValue(), getTimeout()), (Exception) e.getCause());
}
}
use of com.testsigma.automator.exceptions.AutomatorException in project testsigma by testsigmahq.
the class WaitUntilAlertAbsentAction method execute.
@Override
public void execute() throws Exception {
try {
boolean alertNotPresent = getWebDriverWait().until(ExpectedConditions.not(ExpectedConditions.alertIsPresent()));
Assert.isTrue(alertNotPresent, String.format(FAILURE_MESSAGE, getTimeout()));
setSuccessMessage(SUCCESS_MESSAGE);
} catch (TimeoutException e) {
throw new AutomatorException(String.format(FAILURE_MESSAGE, getTimeout()), (Exception) e.getCause());
}
}
Aggregations