Tried to find but without success (at least for my case). Namely, I have to confirm for a textbox field that is non-editable. Data is already written (actually, username) and must not be changed by user (so I have to confirm that is non-editable). Tried this:
WebElement readonly = driver.findElement(By.id("//*[@id=\"settings\"]/div[3]/div/div"));
String fieldName = readonly.getAttribute("disabled");
Result is error. That element looks on page (when inspected):
<form action="settings_id" id="settings" method="post" enctype="multipart/form-data"> .
<div class="row collapse"> (3rd div)
<div class="medium-12 columns">
<div class="settings-input-disabled">username of logged user</div>
On front of application is shown greyed username of logged user. Thank you in advance.