element(formName + "DateConv2Message").assertText("");
element(formName + "NumberConvMessage").assertText("");
}
private void isFailedStandardValidators(String formName) {
Selenium selenium = getSelenium();
assertTrue(selenium.getText(formName + "RequiredMessage").contains("Validation Error"));
ElementInspector doubleRangeMsg = element(formName + "ValidDRMessage");
assertTrue(
doubleRangeMsg.text().contains("Validation Error: Specified attribute is not between the expected values of 0.001 and 0.999.") ||
doubleRangeMsg.text().contains("Validation Error: Specified attribute is not between the expected values of 0,001 and 0,999.") ||
doubleRangeMsg.text().equals("Validation Error"));
ElementInspector longRangeMsg = element(formName + "ValidLRMessage");
assertTrue(
longRangeMsg.text().contains("Validation Error: Specified attribute is not between the expected values of 10 and 100.") ||
longRangeMsg.text().equals("Validation Error"));
element(formName + "ValidLMessage").assertContainsText("Validation Error");
if (formName.equals("serverValidation:")) {
assertSubstringIgnoreCase("serverValidation:intConv: 'Non-integer value' must be a number consisting of one or more digits.", selenium.getText(formName + "IntConvMessage"));
assertSubstringIgnoreCase("serverValidation:doubleConv: 'Non-double value' must be a number consisting of one or more digits.", selenium.getText(formName + "DoubleConvMessage"));
assertSubstringIgnoreCase("serverValidation:byteConv: '2V0' must be a number between 0 and 255.", selenium.getText(formName + "ByteConvMessage"));
assertSubstringIgnoreCase("serverValidation:shortConv: '999999999' must be a number consisting of one or more digits.", selenium.getText(formName + "ShortConvMessage"));
assertSubstringIgnoreCase("serverValidation:floatConv: '2V0' must be a number consisting of one or more digits.", selenium.getText(formName + "FloatConvMessage"));
assertSubstringIgnoreCase("serverValidation:dateConv: '12/02/2007' could not be understood as a date.", selenium.getText(formName + "DateConvMessage"));
assertSubstringIgnoreCase("serverValidation:dateConv2: '12/02/2007' could not be understood as a date and time.", selenium.getText(formName + "DateConv2Message"));
assertSubstringIgnoreCase("serverValidation:numberConv: 'Not Number' is not a number pattern.", selenium.getText(formName + "NumberConvMessage"));
} else {
assertSubstringIgnoreCase("Conversion error", selenium.getText(formName + "IntConvMessage"));
assertSubstringIgnoreCase("Conversion error", selenium.getText(formName + "DoubleConvMessage"));
assertSubstringIgnoreCase("Conversion error", selenium.getText(formName + "ByteConvMessage"));
assertSubstringIgnoreCase("Conversion error", selenium.getText(formName + "ShortConvMessage"));
assertSubstringIgnoreCase("Conversion error", selenium.getText(formName + "FloatConvMessage"));
assertSubstringIgnoreCase("Conversion error", selenium.getText(formName + "DateConvMessage"));
assertSubstringIgnoreCase("Conversion error", selenium.getText(formName + "DateConv2Message"));
assertSubstringIgnoreCase("Conversion error", selenium.getText(formName + "NumberConvMessage"));
}
}