Trying to remove html readonly attribute using python

Viewed 203

I'm trying to remove readonly tag from an input field by using python and selenium. Can anybody help me here?

Datepicker Image:

date

HTML:

<input id="startDate" name="START_DATE" type="text" class="date hasDatepicker" readonly="readonly">

Code I've tried :

driver.execute_script('driver.find_element_by_xpath('"+//*[@id = '"+'startDate'+"']+"').removeAttribute("readonly")')
1 Answers
Related