mibutec / popperfw

Declarative PageObjects for Java
Apache License 2.0
3 stars 3 forks source link

In TextAreas, isEditable() does not react to readonly attribute #12

Closed nwwerum closed 2 years ago

nwwerum commented 4 years ago

HTML textareas (https://www.w3schools.com/tags/tag_textarea.asp) can be set to disabled as well as readonly.

The org.popper.fw.webdriver.elements.impl.TextArea does not react to the readonly attribute when checking if the element isEditable().

Workaround (and solution): extend TextArea with method:

@Override
public boolean isEditable() {
    return super.isEditable() && !isReadonly();
}
public boolean isReadonly() {
    return getAttribute("readonly") != null;
}