From 82ed063fac501a5f5b61f378fc14ffc862ed9f3c Mon Sep 17 00:00:00 2001 From: SiKing Date: Fri, 4 Dec 2020 11:18:31 -0800 Subject: [PATCH] correct the check for value attribute (#2329) Co-authored-by: V. Mark Lehky --- .../net/serenitybdd/core/pages/WebElementFacadeImpl.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/serenity-core/src/main/java/net/serenitybdd/core/pages/WebElementFacadeImpl.java b/serenity-core/src/main/java/net/serenitybdd/core/pages/WebElementFacadeImpl.java index 12b8ebf8f3..ba3c87cf22 100644 --- a/serenity-core/src/main/java/net/serenitybdd/core/pages/WebElementFacadeImpl.java +++ b/serenity-core/src/main/java/net/serenitybdd/core/pages/WebElementFacadeImpl.java @@ -1094,12 +1094,8 @@ private void throwShouldBePresentErrorWithCauseIfPresent(final Throwable timeout throw new ElementShouldBePresentException(finalMessage, timeout); } - private static final List HTML_ELEMENTS_WITH_VALUE_ATTRIBUTE = Arrays.asList("input", "button", "option", "textarea"); - private boolean hasValueAttribute(WebElement element) { - String tag = element.getTagName().toLowerCase(); - return HTML_ELEMENTS_WITH_VALUE_ATTRIBUTE.contains(tag); - + return element.getAttribute("value") != null; } @Override