Reputation: 767
This is the html code for a textarea that has been disabled from UI.
<div class="ftnt-input">
<input class="" disabled="" name="group_name" type="text" value="Orange, APPLE">
</div>
Does anyone know how to verify that the text field is disabled in python selenium code ?
Upvotes: 3
Views: 1773
Reputation: 2326
You can use is_enabled() method of web driver.
Python
driver.find_element_by_name("group_name").is_enabled
Java
driver.findElement(By.name("")).isEnabled();
It will return true if its enabled otherwise false.
Upvotes: 1