send keys are not working in selenium with python. This was working earlier but it fails now. I don't know what may be the issue . It gives following error :
u"Element is disabled and so may not be used
for actions\nCommand duration or timeout: 11
milliseconds\nBuild info: version: '2.15.0', revision: '15105', time:
'2011-12-08 09:56:25'\nSystem info: os.name: 'Windows 7', os.arch:
'amd64', os.version: '6.1', java.version: '1.6.0_22'
I have used below along with time.sleep(3)
before passing keys
elem.send_keys('selenium')
elem.send_keys(Keys.RETURN)
Also
elem.send_keys("Sale" + Keys.RETURN)
But nothing works
As the error says, the element is disabled
and hence you(a user using a browser, selenium tries to mimic such a user) can not interact with that element.
I noticed this also. find_element_by_*
returns a list. A quick fix is to use the first element, i.e. elem[0].send_keys(text)
.