check a readonly field using selenium webdriver

This will check the field is readonly or not.

assertNotNull(driver.findElement(By.name(“xyz”)).getAttribute(“readonly”));

 

No images available.