user3595231
user3595231

Reputation: 767

python selenium to check if this text field is disabled or not

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

Answers (1)

rahul rai
rahul rai

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

Related Questions